GraphQL Queries

You can use Andromeda.js to perform queries on a GraphQL server that we have set up.

GraphQL URI

The URI to send the GQL queries to:

let uri: string =
  process.env.GQL_URL ?? "https://andr-gql.herokuapp.com/graphql"

query

Queries the GraphQL server.

This query function is used by all the ADO queries.

export async function query<Input, Output>(
  document: RequestDocument,
  variables?: Input
) {
  return await request<Output>(uri, document, variables ?? {});
}

setGQLUri

Sets the GQL Server URI.

export function setGQLUri(newUri: string) {
  uri = newUri;
}

Last updated