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. SelectPlaygroundtab.
- 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 headersget automatically added. The same request headers are present in the API configurations of the instance.
- Write the method. Enter input data under the
QUERY VARIABLEStab. Hit theblue play buttonto 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
Historybutton.
- Select the method and click the
Usebutton to again insert the method in a tab on GraphQL Playground.
- You may correct the improperly formatted code with
Prettifybutton
- 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 CURLto 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