GraphQL Shared Types
Insert Lead paragraph here.
Creating a subgraph via the Dasboard UI
- Log in to the Dashboard and go to APIs > Add New API > Federation > Subgraph.
- Choose a name for the subgraph and provide an upstream URL.
Note
In case your upstream URL is protected, select Upstream Protected and provide authorisation details (either Header or Certificate information).
- Go to Configure API and configure your subgraph just as you would any other API in Tyk.
Note
In v4.0 subgraphs will be set to Internal by default.
- Once you have configured all the options click Save. The subgraph is now visible in the list of APIs.
Creating a supergraph via the Dasboard UI
- Log in to the Dashboard and go to APIs > Add New API > Federation > Supergraph.
- In the Details section select all the subgraphs that will be included in your supergraph.
- Go to Configure API and configure your supergraph just as you would any other API in Tyk.
- Once you configure all the options click Save. The supergraph is now available in your list of APIs.
Defining Global Headers
In v4.0 you can define global (Supergraph) headers. Global headers are forwarded to all subgraphs that apply to the specific upstream request.
Setting a Global Header
- After creating your supergraph, open the API in your Dashboard.
- From the Subgraphs tab click Global Headers.
- Enter your header name and value. You can add more headers by clicking Add Headers.
- Click Update to save the header.
- On the pop-up that is displayed, click Update API.
- If you want to delete a global header, click the appropriate bin icon for it.
- You can update your headers by repeating steps 2-5.