File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ declare module "@apollo/react-hooks" {
8
8
MutationHookOptions ,
9
9
MutationTuple ,
10
10
QueryHookOptions ,
11
+ SubscriptionHookOptions ,
11
12
} from "@apollo/react-hooks/lib/types" ;
12
13
13
14
export * from "@apollo/react-hooks/lib/index" ;
@@ -29,4 +30,18 @@ declare module "@apollo/react-hooks" {
29
30
mutation : TypedDocumentNode < TVariables , TData > ,
30
31
options ?: TOptions
31
32
) : MutationTuple < TData , TVariables > ;
33
+
34
+ export function useSubscription <
35
+ TData ,
36
+ TVariables extends OperationVariables ,
37
+ TOptions extends SubscriptionHookOptions < TData , TVariables >
38
+ > (
39
+ subscription : TypedDocumentNode < TVariables , TData > ,
40
+ options ?: TOptions
41
+ ) : {
42
+ variables : TVariables | undefined ;
43
+ loading : boolean ;
44
+ data ?: TData | undefined ;
45
+ error ?: import ( "apollo-client" ) . ApolloError | undefined ;
46
+ } ;
32
47
}
You can’t perform that action at this time.
0 commit comments