Introduction

Pathwright uses GraphQL for our public and private APIs. Our GraphQL exposes most core operations that make Pathwright work. If you'd like to find out more about GraphQL, we recommend starting at GraphQL.org

Access your School's GraphQL Sandbox

The GraphQL Sandbox is a visual GraphQL query tool that allows you to write queries and view query responses directly from the browser.

You need two things to use your GraphQL endpoint:

  1. An API auth token: If you don't have an auth token setup yet, email [email protected] and we'll get one set up for you.
  2. Your Pathwright School ID: To find your school ID, navigate to your Pathwright school, open up the browser developer tools and execute: school.id

Once you have both of the above, you can browse the GraphQL Sandbox by doing the following:

  1. Go to the following link, replacing “<your_school_id>” with your school ID: [https://gql.pathwright.com/graphql?school_id=<your_school_id>](https://gql.pathwright.com/graphql?school_id=<your_school_id>)
    1. You may need to click the “query this endpoint from Apollo Studio” link.
    2. You can additionally check the box “Automatically redirect to Studio next time” to avoid having to do [a] next time.
  2. In the Headers section, add a new “Authorization” header with a value of “Token <your_auth_token>”, replacing “<your_auth_token>” with your auth token.

⚠️  Note: If you’re testing API integrations on our staging servers, you’ll need to instead access our staging GraphQL server by substituting the gql.pathwright.com portion of the URL to gql.pathwrightstaging.com.

Browsing the GraphQL Schema

There's a panel to the left in the GraphQL Sandbox that allows you to browse all data objects that are exposed through our GraphQL endpoint. Select “Schema” to open it. If you have any questions about access or queries feel free to reach out to our team.

Connecting to the GraphQL API from your client

There are GraphQL client libraries for practically every language or framework. The details below should apply to any of them

To connect to the client you'll need to set your client endpoint URL to:

https://gql.pathwright.com/graphql?school_id=<your_school_id>

⚠️  Note: If you’re testing API integrations on our staging servers, you’ll need to instead access our staging GraphQL server by substituting the gql.pathwright.com portion of the URL to gql.pathwrightstaging.com.