Enable GraphQL Auto Complete in Postman
Author:
Fluent Commerce
Changed on:
13 Dec 2023
Key Points
- Prerequisites
- Steps to Follow
Steps
Prerequisites
Step-by-step guide
Step 1: Introspect the Fluent GraphQL Schema
Refer to the guide on How to Introspect the Fluent GraphQL Schema.
Step 2: Save the response to a file
This is easily done in the Postman Response pane, by selecting the "Save Response" dropdown on the right.
Give it a meaningful name:
`fluent-graphql.json`
Step 3: Convert the JSON GraphQL Schema to GraphQL Schema Definition Language (SDL)
Use the response file from Step 2: Save the response to a file and refer to the guide on How to convert a JSON Introspection result to Schema Definition Language (SDL).
Step 4: Create a new Postman API and collection
Refer to the guide on How to Create a Fluent GraphQL API in Postman
Step 5: Configure the GraphQL Request Body to validate against the GraphQL API
- Open a new Request window, and configure it for GraphQL.
- Click on the No schema dropdown (you may need to click on the refresh button first), and select the GraphQL API installed in Step 4
- In the Query pane, use to initiate auto-completion!
`Ctrl + Space`
Click on the thumbnails below for examples.