Introducing Automatic Schema Imports for GraphQL Requests

Giridhar

GraphQL is one of the most popular query languages out there for APIs, and Postman has been supporting GraphQL over HTTP for a long time now.

The GraphQL schema defines what is supported by the API and gives an idea of what can be queried. It is instrumental when it comes to understanding the API and building your queries against that API. Postman has been allowing users to import a schema and connect it against a GraphQL API request.

Today, we are introducing an option to easily import schemas for your GraphQL requests.

For requests with body type GraphQL, Postman will now automatically import the GraphQL schema if available. Once the schema is successfully imported, the GraphQL query editor will automatically leverage this schema to provide features such as the autocomplete function:

Automatic Schema import for GraphQL Requests

Schema imports for GraphQL type requests are automatically turned on by default, but you can choose to opt out of it or use your existing schemas if needed.

We hope this feature helps you build your GraphQL queries faster in Postman. You can learn more about GraphQL in our Learning Center—and let us know what you think in the comments or feel free to open a ticket in our public issue tracker on GitHub.

Try Postman now

What do you think about this topic? Tell us in a comment below.

Comment

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.

6 thoughts on “Introducing Automatic Schema Imports for GraphQL Requests

    It seems like schema requests are not sending the authentication header along with the schema requests.

    Feature is great! But how to disable auto-fetch on everytime as I open the requests? I takes 1-2 seconds and I don’t need to fetch schema everytime.

    Great feature! However, it seems like pre-request scripts do not run on auto-fetch of the gql schema. This can be problematic if we are, for instance, setting required headers for all requests in a pre-request script.

    could you please list down the steps to view the auto downloaded graphql schema by postman?

    Can we have an option to view graphql schema as well? Insomnia has this feature and some browser plugins made it possible as well.

    Option to view/browse the schema when auto-fetching or import it to the API definition would be great