Make GraphQL query or mutation request.
VariableTypeNotes
query (required)StringA valid GraphQL query or mutation.
variablesObjectKey-value pairs to use in your GraphQL query.
httpOptionsObject
const { data, error } = await nhost.graphql.request(`
  query {
    customers {
      id
      name
      public
    }
  }
`);

Returns the GraphQL API endpoint of the Nhost app.
const graphqlEndpoint = nhost.graphql.getUrl();