Function sendGraphqlQuery

  • Send a GraphQL query to the API

    Parameters

    • token: string

      Auth token. This is the token returned by getAuthToken(). Just the token, do not include "Bearer" in this string, that is handled inside the method.

    • organizationContext: string

      Organization context. This is provided by the Finite State API management. It looks like "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".

    • query: string

      The GraphQL query string

    • Optionalvariables: Record<string, any>

      Variables to be used in the GraphQL query, by default null

    Returns Promise<any>

    • Response JSON
    • If the response status code is not 200