apollo-elements/apollo-elements

View on GitHub
docs/type-tables/QueryHookOptions.md

Summary

Maintainability
Test Coverage
| Option                      | Type                                                  | Description                                                                                                                                |
| --------------------------- | ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| client                      | `ApolloClient`{lang=ts}                               | ApolloClient instance use to make the call.                                                                                                |
| context                     | `Record<string, unknown>`{lang=ts}                    | Context object passed through the link execution chain.                                                                                    |
| errorPolicy                 | `ErrorPolicy`{lang=ts}                                | Error policy to use for the mutation. See [`errorPolicy`](/api/core/interfaces/query/#errorpolicy)                                         |
| fetchPolicy                 | `FetchPolicy`{lang=ts}                                | See [`fetchPolicy`](/api/core/interfaces/query/#fetchpolicy)                                                                               |
| nextFetchPolicy             | `FetchPolicy`{lang=ts}                                | See [`nextFetchPolicy`](/api/core/interfaces/query/#nextfetchpolicy)                                                                       |
| noAutoSubscribe             | `boolean`{lang=ts}                                    | See [`noAutoSubscribe`](/api/core/interfaces/query/#noautosubscribe)                                                                       |
| notifyOnNetworkStatusChange | `boolean`{lang=ts}                                    | See [`notifyOnNetworkStatusChange`](/api/core/interfaces/query/#notifyonnetworkstatuschange)                                               |
| onCompleted                 | `(data: D) => void`{lang=ts}                          | Callback for when the query resolves.                                                                                                      |
| onError                     | `(error: ApolloError) => void`{lang=ts}               | Callback for when an error occurs. See [`onError`](/api/core/interfaces/query/#onerror)                                                    |
| partialRefetch              | `boolean`{lang=ts}                                    | See [`partialRefetch`](/api/core/interfaces/query/#partialrefetch)                                                                         |
| pollInterval                | `number`{lang=ts}                                     | See [`pollInterval`](/api/core/interfaces/query/#pollinterval)                                                                             |
| query                       | `DocumentNode`{lang=ts}                               | A GraphQL document that consists of a single query to be sent down to the server.                                                          |
| returnPartialData           | `boolean`{lang=ts}                                    | See [`returnPartialData`](/api/core/interfaces/query/#returnpartialdata)                                                                   |
| shouldSubscribe             | `(op?: Partial<Operation<D, V>>) => boolean`{lang=ts} | Predicate which determines whether or not to automatically subscribe. See [`shouldSubscribe`](/api/core/interfaces/query/#shouldsubscribe) |
| variables                   | `Variables<D, V>`{lang=ts}                            | A map going from variable name to variable value, where the variables are used within the GraphQL query.                                   |