Skip to main content

sdk.subgraph.rawrequest

Home > @openformat/sdk > Subgraph > rawRequest

Subgraph.rawRequest() method

Makes a raw request to the Open Format subgraph allowing you to pass your own Query or Mutation

Signature:

rawRequest<T = any, V = Variables>(document: RequestDocument, variables?: V): Promise<T>;

Parameters

ParameterTypeDescription
documentRequestDocumenta graphql query
variablesV(Optional) an optional object of query variables

Returns:

Promise<T>

a result from the subgraph

Example

sdk.subgraph.rawRequest(gql`{ apps { id } }`)