GraphQL Explorer
fulfillmenttools GraphiQL

The official fulfillmenttools playground, powered by GraphiQL, is hosted under https://{YOUR_TENANT}.graphql.fulfillmenttools.com/graphql
. It enables interactive exploration of queries and docs, with more features coming soon. Auth tokens must be entered in the header tab at the bottom of the page.
Altair

For in-depth query development on top of our GraphQL API, we recommend Altair, available as a browser plugin and standalone application. We also provide a pre-request script to automatically refresh auth tokens, similar to our Postman collection.
To start with Altair, enter your tenant's GraphQL URL in the URL bar. Please remember that using Altair for schema introspection will not include schema directives and lifecycle information from generated GraphQL schemas.
Pre-Request Script for Altair
The following guide shows how to set up a pre-request script in Altair.
First, create a new environment for your tenant:

Fill the following information:
{
"user": "YOUR-USER-EMAIL",
"password": "YOUR-PASSWORD",
"host": "https://YOUR-TENANT-NAME.graphql.fulfillmenttools.com/graphql",
"apiKey": "YOUR-API-KEY"
}
Next, add the following Pre-request script in the Pre-request tab. Don't forget to enable it.

const lastTokenCall = await altair.storage.get("lastTokenCall");
const now = new Date();
if (!lastTokenCall || now - (new Date(lastTokenCall)) > 1800000) {
altair.log("Refreshing token...");
var user = altair.helpers.getEnvironment('user');
var apiKey = altair.helpers.getEnvironment("apiKey");
var escapedPwd = altair.helpers.getEnvironment('password');
escapedPwd = escapedPwd.replace(/\\/g, '\\\\');
escapedPwd = escapedPwd.replace(/\'/g, '\\\'');
escapedPwd = escapedPwd.replace(/\"/g, '\\\"');
escapedPwd = escapedPwd.replace(/\`/g, '\\\`');
await altair.storage.set("lastTokenCall", new Date());
const authUrl = 'https://identitytoolkit.googleapis.com/v1/accounts:signInWithPassword?key=' + apiKey
const authResult = await fetch(authUrl, {
"method": "POST",
"body": JSON.stringify({
"email": user,
"password": escapedPwd,
"returnSecureToken": true
})
}).catch((e) => altair.log(e))
const data = await authResult.json()
altair.helpers.setEnvironment("authToken", data.idToken, true);
altair.helpers.setEnvironment("refreshToken", data.refreshToken, true);
}
Finally, adjust the Authentication header to use the automatically generated token:


Now it should work and automatically refresh the token when it’s older than 30 Minutes. Have fun!
Last updated