@twilio/flex-sdk
    Preparing search index...

    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.

    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.

    Hierarchy (View Summary)

    • 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.

      Type Parameters

      • TData
      • TVariables extends OperationVariables
      • _INFERENCE_ONLY_DO_NOT_SPECIFY extends "inferred"
      • TErrorPolicy extends ErrorPolicy | undefined = undefined

      Parameters

      • options: {
            context?: DefaultContext;
            errorPolicy?: ErrorPolicy;
            fetchPolicy?: FetchPolicy;
            query: DocumentNode | TypedDocumentNode<TData, TVariables>;
        } & VariablesOption<NoInfer<TVariables>> & { errorPolicy?: TErrorPolicy }

        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?: DefaultContext

          If you're using Apollo Link, this object is the initial value of the context object that's passed along your link chain.

          1. Networking options
        • OptionalerrorPolicy?: ErrorPolicy

          Specifies 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.

          1. Operation options
        • OptionalfetchPolicy?: FetchPolicy

          Specifies 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.

          1. Caching options
        • query: DocumentNode | TypedDocumentNode<TData, TVariables>

          A GraphQL query string parsed into an AST with the gql template literal.

          1. Operation options

      Returns Promise<QueryResult<TData, TErrorPolicy>>

    • Type Parameters

      • TData
      • TVariables extends OperationVariables = OperationVariables
      • TErrorPolicy extends ErrorPolicy | undefined = undefined

      Parameters

      • options: {
            context?: DefaultContext;
            errorPolicy?: ErrorPolicy;
            fetchPolicy?: FetchPolicy;
            query: DocumentNode | TypedDocumentNode<TData, TVariables>;
        } & VariablesOption<NoInfer<TVariables>> & (
            TErrorPolicy extends undefined ? {} : { errorPolicy: TErrorPolicy }
        )

        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?: DefaultContext

          If you're using Apollo Link, this object is the initial value of the context object that's passed along your link chain.

          1. Networking options
        • OptionalerrorPolicy?: ErrorPolicy

          Specifies 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.

          1. Operation options
        • OptionalfetchPolicy?: FetchPolicy

          Specifies 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.

          1. Caching options
        • query: DocumentNode | TypedDocumentNode<TData, TVariables>

          A GraphQL query string parsed into an AST with the gql template literal.

          1. Operation options

      Returns Promise<QueryResult<TData, TErrorPolicy>>

      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.