@shopify/react-graphql
Advanced tools
Comparing version 0.0.0-snapshot-20231019204709 to 0.0.0-snapshot-20240308174203
@@ -5,6 +5,6 @@ import type { ApolloClient, MutationOptions as ClientMutationOptions, QueryResult, OperationVariables, MutationOptions, FetchResult } from '@apollo/client'; | ||
import type { VariableOptions } from '../types'; | ||
export type QueryHookOptions<Data = any, Variables = OperationVariables> = Omit<QueryComponentOptions<Data, Variables>, 'query' | 'partialRefetch' | 'children' | 'variables'> & VariableOptions<Variables> & { | ||
export type QueryHookOptions<Data = any, Variables extends OperationVariables = OperationVariables> = Omit<QueryComponentOptions<Data, Variables>, 'query' | 'partialRefetch' | 'children' | 'variables'> & VariableOptions<Variables> & { | ||
skip?: boolean; | ||
}; | ||
export interface QueryHookResult<Data, Variables> extends Omit<QueryResult<Data, Variables>, 'networkStatus' | 'variables' | 'reobserve' | 'observable'> { | ||
export interface QueryHookResult<Data, Variables extends OperationVariables> extends Omit<QueryResult<Data, Variables>, 'networkStatus' | 'variables' | 'reobserve' | 'observable'> { | ||
networkStatus: QueryResult<Data, Variables>['networkStatus'] | undefined; | ||
@@ -11,0 +11,0 @@ variables: QueryResult<Data, Variables>['variables'] | undefined; |
@@ -5,3 +5,3 @@ /// <reference types="react" /> | ||
import type { QueryHookResult, QueryHookOptions } from './hooks'; | ||
interface QueryComponentOptions<Data, Variables> extends QueryHookOptions { | ||
interface QueryComponentOptions<Data, Variables extends OperationVariables> extends QueryHookOptions { | ||
children: (result: QueryHookResult<Data, Variables>) => JSX.Element | null; | ||
@@ -8,0 +8,0 @@ query: DocumentNode<Data, Variables>; |
@@ -15,3 +15,3 @@ import type { ReactNode } from 'react'; | ||
}>>; | ||
export type QueryProps<Data = any, Variables = OperationVariables> = { | ||
export type QueryProps<Data = any, Variables extends OperationVariables = OperationVariables> = { | ||
children: (result: QueryResult<Data, Variables>) => ReactNode; | ||
@@ -34,6 +34,6 @@ fetchPolicy?: WatchQueryFetchPolicy; | ||
} & VariableOptions<Variables>; | ||
export interface AsyncDocumentNode<Data, Variables, DeepPartial> extends GraphQLOperation<Data, Variables, DeepPartial>, AsyncHookTarget<DocumentNode<Data, Variables, DeepPartial>, {}, VariableOptions<Variables>, VariableOptions<Variables> & Pick<QueryProps<Data, Variables>, 'pollInterval'>> { | ||
export interface AsyncDocumentNode<Data, Variables extends OperationVariables, DeepPartial> extends GraphQLOperation<Data, Variables, DeepPartial>, AsyncHookTarget<DocumentNode<Data, Variables, DeepPartial>, {}, VariableOptions<Variables>, VariableOptions<Variables> & Pick<QueryProps<Data, Variables>, 'pollInterval'>> { | ||
} | ||
export interface AsyncQueryComponentType<Data, Variables, DeepPartial> extends GraphQLOperation<Data, Variables, DeepPartial>, AsyncComponentType<DocumentNode<Data, Variables, DeepPartial>, QueryHookOptions<Data, Variables> & Pick<QueryProps<Data, Variables>, 'children'>, {}, VariableOptions<Variables>, VariableOptions<Variables> & Pick<QueryProps<Data, Variables>, 'pollInterval'>> { | ||
export interface AsyncQueryComponentType<Data, Variables extends OperationVariables, DeepPartial> extends GraphQLOperation<Data, Variables, DeepPartial>, AsyncComponentType<DocumentNode<Data, Variables, DeepPartial>, QueryHookOptions<Data, Variables> & Pick<QueryProps<Data, Variables>, 'children'>, {}, VariableOptions<Variables>, VariableOptions<Variables> & Pick<QueryProps<Data, Variables>, 'pollInterval'>> { | ||
} | ||
//# sourceMappingURL=types.d.ts.map |
{ | ||
"name": "@shopify/react-graphql", | ||
"version": "0.0.0-snapshot-20231019204709", | ||
"version": "0.0.0-snapshot-20240308174203", | ||
"license": "MIT", | ||
@@ -27,7 +27,6 @@ "description": "Tools for creating type-safe and asynchronous GraphQL components for React", | ||
"dependencies": { | ||
"@apollo/client": "^3.5.8", | ||
"@shopify/async": "^4.0.3", | ||
"@shopify/react-async": "0.0.0-snapshot-20231019204709", | ||
"@shopify/react-async": "0.0.0-snapshot-20240308174203", | ||
"@shopify/react-effect": "^5.0.3", | ||
"@shopify/react-hooks": "^3.0.5", | ||
"@shopify/react-hooks": "0.0.0-snapshot-20240308174203", | ||
"@shopify/react-idle": "^3.1.2", | ||
@@ -39,3 +38,3 @@ "@shopify/useful-types": "^5.1.2", | ||
"devDependencies": { | ||
"@shopify/react-testing": "^5.1.3" | ||
"@shopify/react-testing": "^5.1.4" | ||
}, | ||
@@ -51,2 +50,3 @@ "files": [ | ||
"peerDependencies": { | ||
"@apollo/client": ">=3.5.8 || <4.0.0", | ||
"react": ">=16.8.0 <19.0.0" | ||
@@ -53,0 +53,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
89138
+ Added@shopify/react-async@0.0.0-snapshot-20240308174203(transitive)
+ Added@shopify/react-hooks@0.0.0-snapshot-20240308174203(transitive)
+ Added@shopify/react-hydrate@0.0.0-snapshot-20240308174203(transitive)
- Removed@apollo/client@^3.5.8
- Removed@shopify/react-async@0.0.0-snapshot-20231019204709(transitive)
- Removed@shopify/react-hooks@3.2.04.1.2(transitive)
- Removed@shopify/react-hydrate@3.1.4(transitive)