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
| Parameter | Type | Description |
|---|---|---|
| document | RequestDocument | a graphql query |
| variables | V | (Optional) an optional object of query variables |
Returns:
Promise<T>
a result from the subgraph
Example
sdk.subgraph.rawRequest(gql`{ apps { id } }`)