GraphQL Playground
- On the Hypi platform, you can execute various GraphQL methods with
GraphQL playground
. Click onAPI Instances
. Select the instance from the list of instances. SelectPlayground
tab.
- A sample FindAccount query is always present in the starting tab. Click on the
+
button to add a new tab to execute a method.
- Note that
HTTP request headers
get automatically added. The same request headers are present in the API configurations of the instance.
- Write the method. Enter input data under the
QUERY VARIABLES
tab. Hit theblue play button
to execute the method. You will get the response on the right-hand side box.
- You can check the history of executed methods (APIs) by clicking the
History
button.
- Select the method and click the
Use
button to again insert the method in a tab on GraphQL Playground.
- You may correct the improperly formatted code with
Prettify
button
- The brackets get aligned properly with
Prettify
.
- You may see the endpoint in a box to make an HTTP request. You may refresh the instance by clicking refresh symbol in front of it. Click
Copy CURL
to copy the HTTP request.
Paste the copied CURL
to verify the request.
curl 'https://api.alpha.hypi.dev/graphql' -H 'Accept-Encoding: gzip, deflate, br' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Connection: keep-alive' -H 'DNT: 1' -H 'Origin: https://alpha.hypi.dev' -H 'Authorization: <Auth Key>' -H 'hypi-domain: ignorant.apps.hypi.app' --data-binary '{"query":"mutation Upsert($values: HypiUpsertInputUnion!) {\n upsert(values: $values) {\n id\n }\n}\n","variables":{"values":{"Author":[{"name":"Dan Brown","age":56,"booklist":[{"title":"Da Vinci Code","publication":"abc","available":true}]}]}}}' --compressed