An object of type QueryOptions that allows us to
describe how this query should be treated e.g. whether it should hit the
server at all or just resolve from the cache, etc.
Optionalcontext?: DefaultContextIf you're using Apollo Link, this object is the initial value of the context object that's passed along your link chain.
OptionalerrorPolicy?: ErrorPolicySpecifies how the query handles a response that returns both GraphQL errors and partial results.
For details, see GraphQL error policies.
The default value is none, meaning that the query result includes error details but not partial results.
OptionalfetchPolicy?: FetchPolicySpecifies how the query interacts with the Apollo Client cache during execution (for example, whether it checks the cache for results before sending a request to the server).
For details, see Setting a fetch policy.
The default value is cache-first.
A GraphQL query string parsed into an AST with the gql template literal.
OptionalerrorPolicy?: TErrorPolicyAn object of type QueryOptions that allows us to
describe how this query should be treated e.g. whether it should hit the
server at all or just resolve from the cache, etc.
Optionalcontext?: DefaultContextIf you're using Apollo Link, this object is the initial value of the context object that's passed along your link chain.
OptionalerrorPolicy?: ErrorPolicySpecifies how the query handles a response that returns both GraphQL errors and partial results.
For details, see GraphQL error policies.
The default value is none, meaning that the query result includes error details but not partial results.
OptionalfetchPolicy?: FetchPolicySpecifies how the query interacts with the Apollo Client cache during execution (for example, whether it checks the cache for results before sending a request to the server).
For details, see Setting a fetch policy.
The default value is cache-first.
A GraphQL query string parsed into an AST with the gql template literal.
Avoid manually specifying generics on client.query.
Instead, rely on TypeScript's type inference along with a correctly typed TypedDocumentNode to get accurate types for your query results.
This resolves a single query according to the options specified and
returns a Promise which is either resolved with the resulting data
or rejected with an error.
This resolves a single query according to the options specified and returns a
Promisewhich is either resolved with the resulting data or rejected with an error.