Skip to main content
Feedback

GraphQL API Reference UI Usage

The Developer Portal now supports GraphQL editor for writing, testing, and viewing GraphQL APIs. The GraphQL editor automatically fetches a GraphQL API's schema using introspection and shows available data fields, queries, and mutations for the endpoint. If your schema needs authentication, then provide the authentication header to execute the query.

You can also perform various other operation in the GraphQL editor such as view documentation in Document Explorer, History, use Explorer schema to add data field to the query operation, re-fetch schema, open short keys, and manage settings.

note

If an API is under any authentication, the introspection queries will fail to display any information in the Document Explorer.

About GraphQL Query, Headers, Request, and Response

The following is an example of testing the GraphQL query on the Developer Portal.

Adding Query and Headers

To test your GraphQL query, first add the query in the request section. On the left-hand side, you can use the Show GraphQL Explorer to add fields to the query operation. Select the fields to mark them selected to insert them into the query operation.

If your schema needs authentication, provide the authentication header in the Headers section. Then, run the query by clicking Execute query button.

Image

The query returns results as a JSON object on the right side of the editor. Image

On this Page