Features of GraphQL Playground

The GraphQL Playground is based on GraphiQL. It has a lot of features with the features of GraphiQL. GraphQL has query history feature means that GraphQL queries in GraphQL Playground are kept under query history and you can view query history with the history button.

Also in GraphQL Playground you can configure query variables in query variables tab or HTTP headers in HTTP headers tab, they are placed on the bottom of the GraphQL Playground tab.

You may use multiple tabs in GraphQL Playground for GraphQL queries, even with different endpoint. Prettify settings and query history will be shared with new tabs. These tabs are like the tabs in your browser, you can visit different website in different tabs but settings will be same for each tab.

In GraphQL Playground, you can set an endpoint or copy, use prettify button to prettify your GraphQL queries, view history with history button, change the Settings property, set a query variable under the query variable tab to use the variable in the query, set HTTP headers to configure HTTP headers when you need to, show query schema and add new tab. Schema is helpful when you are writing GraphQL queries, it shows the variables as a GraphQL Schema or shows a Schema documentation, where you can display variables in detail by expanding.

A GraphQL Playground Application

The History button, as in the picture near the prettify button, is to view previous GraphQL queries. You may also view starred GraphQL queries or search a GraphQL query in your GraphQL query history other than just viewing previous GraphQL queries.

A GraphQL query history

In Query Variables you can set a variable to a GraphQL query. You should add your query variable and then use it in your GraphQL query. Query Variables should be written in JSON. In HTTP Headers, you can configure the HTTP header in JSON as you need in order to make a request, like you may set cookie or send authorization with HTTP header.

Using Query Variable

You may change the GraphQL Playground settings in the Settings. You can change the editor properties, prettify properties, request properties, schema pooling properties and tracing properties. You can change editor properties such as font family or font size. You can change prettify properties to be able to view your GraphQL queries as you set up in the Settings. You can change your request properties, like its credentials. You can set request credentials to “omit” to not to send nor receive credentials, to “include” to send user credentials like cookies, to “same-origin” to send user credentials to the server URL that is on the same origin. Schema properties is for the Schema which is automatically fetched from the endpoint, that is used in the query. This is only needed when you want to override the Schema.

GraphQL Playground

GraphQL Playground is a powerful GraphQL IDE which is a graphical, interactive, and in-browser, that enables development workflows and increases developer productivity. It is a form of user interface that visualizes your GraphQL queries and requests. It allows you to get data by a request to the URL you have provided, understand the response of the query you’ve written, and use many features to ease your job related to GraphQL requests other than just writing GraphQL queries. These features will be told in this article later.

Similar Reads

Setting up GraphQL Playground

You have many options for setting up GraphQL Playground. You may set the GraphQL Playground up to use as a desktop application, use it as a module like a react component to a front-end project or a middleware server to a back-end project, or you may use it online by using any of its online demos....

Features of GraphQL Playground

The GraphQL Playground is based on GraphiQL. It has a lot of features with the features of GraphiQL. GraphQL has query history feature means that GraphQL queries in GraphQL Playground are kept under query history and you can view query history with the history button....

GraphQL Playground as a HTML Page

To use GraphQL Playground as a html page, you can simply render the Playground HTML in a simple html page or in a html page with full loading animation by a CDN. You can add the GraphQL Playground to your html file by adding...

GraphQL Playground on the Front with React

You may add GraphQL Playground to a front end application by GraphQL Playground React component. To use GraphQL Playground as a react component, you should use the graphql-playground-react. You may add configurations like endpoint as a GraphQL Playground React component props, you can set subscription endpoint by setting subscriptionEndpoint, set setTitle to true if you want to reflect the current endpoint in the page title, and set GraphQL configuration with the graphqlConfig component and in case you provide a GraphQL configuration, you can set your workspace to workspaceName....

GraphQL Playground on the Backend with Node

You can add GraphQL Playground as a module to your backend project, as a server middleware. To use the GraphQL Playground on the backend with Node, you can use express, hapi, koa or lambda....

Conclusion

GraphQL Playground is one of GraphQL IDE that is a graphical user interface and provides a lot of features. You can use GraphQL Playground as a desktop app, as a basic HTML page, as a front end module, as a back end module or as online demo. You can configure settings and use tabs to execute graphql queries, and use many features that are told in this article....