@shopify/react-graphql
Version:
Tools for creating type-safe and asynchronous GraphQL components for React
11 lines • 777 B
TypeScript
import type { OperationVariables } from '@apollo/client';
import type { DocumentNode } from 'graphql-typed';
import type { IfAllNullableKeys, NoInfer } from '@shopify/useful-types';
import type { AsyncDocumentNode } from '../types';
import type { QueryHookOptions, QueryHookResult } from './types';
export default function useQuery<Data extends {} = any, Variables extends OperationVariables = OperationVariables, DeepPartial extends {} = {}>(queryOrAsyncQuery: DocumentNode<Data, Variables, DeepPartial> | AsyncDocumentNode<Data, Variables, DeepPartial>, ...optionsPart: IfAllNullableKeys<Variables, [
QueryHookOptions<Data, NoInfer<Variables>>?
], [
QueryHookOptions<Data, NoInfer<Variables>>
]>): QueryHookResult<Data, Variables>;
//# sourceMappingURL=query.d.ts.map