request()

Overload 1 of 2

Use nhost.graphql.request to send a GraphQL request. For more serious GraphQL usage we recommend using a GraphQL client such as Apollo Client (https://www.apollographql.com/docs/react).

const CUSTOMERS = gql`
  query {
    customers {
      id
      name
    }
  }
`
const { data, error } = await nhost.graphql.request(CUSTOMERS)

Parameters


document required RequestDocument | TypedDocumentNode<T, V>


variablesAndRequestHeaders required


Overload 2 of 2

Parameters


options required RequestOptions<V, T>