Availability
| Component | Version | Editions |
|---|---|---|
| Developer Portal | Available since v1.15.0 | Enterprise |
Prerequisites
- Dashboard License: We will configure GraphQL API using Dashboard. Contact our team to obtain a license or get self-managed trial license by completing the registration on our website.
- Working Tyk Environment: You need access to a running Tyk instance that includes both the Tyk Gateway and Tyk Dashboard components. For setup instructions using Docker, please refer to the Tyk Getting Started Guide.
- Tyk Developer Portal v1.15.0 or later
Instructions
Follow these steps to set up the GraphQL Playground in the Tyk Developer Portal:1. Create a GraphQL API
-
In the Tyk Dashboard, create a new GraphQL API by
- Navigating to APIs > Add New API
- In the next screen, click on Try example and select Star Wars GQL API from the list.
- Click Use Example to create the API.
- Star Wars GQL API uses Auth Token for authentication. Copy the Key ID from the pop-up and save it for later use. We will set the authorization header in the Playground using this Key ID.
-
Now, go to the Schema tab and download the schema.
This schema file will be uploaded to the Developer Portal in a later step.

2. Create the API Catalog
The Tyk Getting Started Guide creates an API Catalog (Public catalogue) by default. If you don’t have one, refer to this guide to create an API Catalog in the Developer Portal.
3. Create an API Product
- Navigate to Developer Portal > API Products
- Click Add new API Product

- On the Details tab, enter the basic product information:

- Product name: A unique product name (e.g., “Star Wars”)
- Publish API product to catalogue: Select the catalog you created previously
- You can leave the other fields empty for now
- On the APIs tab, select the
Star Wars GQL APIcreated in the first step: - On the Documentation tab:
-
Add your GraphQL API endpoint URL (e.g
http://localhost:8080/star-wars-api/).You can find the endpoint URL in the Core Settings tab of your GraphQL API in the Dashboard. -
Upload a GraphQL SDL file (in .graphql, .graphqls, .gql, or JSON format)
By default, the GraphQL playground will introspect the schema from the endpoint if no SDL file is provided. However, if the API is protected, introspection will not work, and the schema will be rendered from the uploaded SDL file.

-
Add your GraphQL API endpoint URL (e.g
- Click Save Changes
4. View the Playground
- Open your Live Portal.
-
Go to Product Catalogues, locate your GraphQL Product and Click Docs.

-
You should now see the GraphQL Playground, ready for interactive query testing.
To test authenticated APIs, ensure you set the required authentication headers in the Playground according to your API’s authentication settings.For example, for the
Star Wars GQL API, add theAuthorizationheader with the valueBearer <Key ID>where<Key ID>is the token you saved earlier.
Troubleshooting
404 GraphQL API Not Found Error in Playground
404 GraphQL API Not Found Error in Playground
If you encounter a
404 GraphQL API Not Found error in the GraphQL Playground, it indicates that the Developer Portal cannot locate the specified GraphQL API.To resolve this issue, ensure that your API ends with a trailing slash (/). (e.g http://localhost:8080/star-wars-api/)You can find the endpoint URL in the Core Settings tab of your GraphQL API in the Dashboard.
"message": "Failed to fetch" error in Playground
"message": "Failed to fetch" error in Playground
If you are seeing a
"message": "Failed to fetch" error in the GraphQL Playground, it is likely due to CORS (Cross-Origin Resource Sharing) restrictions. To resolve this issue, follow these steps:Go to the Dashboard, and add the following CORS configuration to your GraphQL API settings:- Ensure that the
allowed_originsfield includes the URL of your Developer Portal (e.g.,http://localhost:3001for local setups).