Tooling
Built-In Tooling
The GraphQL API offers built-in tooling so that you can get started immediately! You can access the built-in tooling by navigating directly to the endpoint.
https://graphql.fast-weigh.com/
To get started with writing your first query, click the "Create Document" button. If you just want to browse the schema, click the "Browse Schema" button.

Authenticate With Your API Key
Navigate to the top-right of the screen, and click the settings gear to pull up the document's settings

Click the Authorization tab and set the Auth Type to "Bearer"

Enter your API Key in the Token field and click "Apply" to save

View Documentation
Once your API key is pasted in, you can view the always-up-to-date data model docs.
Click the "Reload Schema" button to ensure the schema is up to date

Once you have refreshed, you'll have access to the documentation as well as query auto-completion within the editor. Just click "Schema" on the top-left to switch to the schema viewer.


Using the Operator Builder
While you can hand-write your queries with the help of auto-complete, the built in tooling also offers a "Operator Builder" on the left side of the Operation tab

Once you open the builder, hit the "Create Query" button to get started

There, you can find a Type and select the fields you want to see, any sub-types and fields, and even any "arguments" to build a "where clause" automatically

Insomnia
We recommend using a tool called Insomnia Client for query development and debugging. It has some great built-in features tailored for join REST and GraphQL development that make it quick and easy to get started.
Set Up Development Workspace
Create an account or select "Use Local Scratch Pad"

In the newest versions of Insomnia, a new Project will be auto-created when you create a new account.

Create a Collection (Optional)
If you would like to organize your requests, you can create a Collection within your Project on the left sidebar to house your requests.

If you do not add a Collection manually, one will be created for you when you create your first request!
Create a GraphQL Request
The easiest way to start a new GraphQL quest is by clicking the "+" button on the top-left of the sidebar, and then selecting GraphQL Request from the list

This will automatically set up the request for GraphQL, but you can do it manually, too! If you use the New HTTP Request button, make sure to update the "HTTP method" to "POST" and the "Body" tab's type to "GraphQL".


Add Your Endpoint
In your request, fill in the URL/endpoint. https://graphql.fast-weigh.com/

Authenticate With Your API Key
Navigate to the Auth tab, and set the authentication type to Bearer Token

Enter your API Key in the Token field and set the Prefix to "Bearer"

View Documentation
Once your API key and endpoint are pasted in, you can view the always-up-to-date data model docs without leaving Insomnia.
Back on the "Body" tab you should see a "schema" option at the top right of the query box.

Clicking on that will give you the option to refresh the schema. Doing so will fetch the latest data model from the server and build live documentation.

Once you have refreshed, you'll have access to the documentation as well as query auto-completion within the editor. Just click "Show Documentation" to bring up the schema sidebar.




Last updated