@aws-amplify/api-graphql 3.4.4-graphql-api-functional-options.1 → 3.4.4-unstable.28bc873.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/lib/GraphQLAPI.js +2 -0
  2. package/lib/GraphQLAPI.js.map +1 -1
  3. package/lib-esm/GraphQLAPI.js +2 -0
  4. package/lib-esm/GraphQLAPI.js.map +1 -1
  5. package/package.json +7 -10
  6. package/src/GraphQLAPI.ts +2 -0
  7. package/lib/facade-iterable-paging.d.ts +0 -19
  8. package/lib/facade-iterable-paging.js +0 -115
  9. package/lib/facade-iterable-paging.js.map +0 -1
  10. package/lib/facade-light-flattening.d.ts +0 -19
  11. package/lib/facade-light-flattening.js +0 -69
  12. package/lib/facade-light-flattening.js.map +0 -1
  13. package/lib/facade-no-flattening.d.ts +0 -19
  14. package/lib/facade-no-flattening.js +0 -37
  15. package/lib/facade-no-flattening.js.map +0 -1
  16. package/lib/types/facade-iterable-paging.d.ts +0 -106
  17. package/lib/types/facade-iterable-paging.js +0 -3
  18. package/lib/types/facade-iterable-paging.js.map +0 -1
  19. package/lib/types/facade-light-flattening.d.ts +0 -84
  20. package/lib/types/facade-light-flattening.js +0 -3
  21. package/lib/types/facade-light-flattening.js.map +0 -1
  22. package/lib/types/facade-no-flattening.d.ts +0 -48
  23. package/lib/types/facade-no-flattening.js +0 -3
  24. package/lib/types/facade-no-flattening.js.map +0 -1
  25. package/lib-esm/facade-iterable-paging.d.ts +0 -19
  26. package/lib-esm/facade-iterable-paging.js +0 -109
  27. package/lib-esm/facade-iterable-paging.js.map +0 -1
  28. package/lib-esm/facade-light-flattening.d.ts +0 -19
  29. package/lib-esm/facade-light-flattening.js +0 -63
  30. package/lib-esm/facade-light-flattening.js.map +0 -1
  31. package/lib-esm/facade-no-flattening.d.ts +0 -19
  32. package/lib-esm/facade-no-flattening.js +0 -31
  33. package/lib-esm/facade-no-flattening.js.map +0 -1
  34. package/lib-esm/types/facade-iterable-paging.d.ts +0 -106
  35. package/lib-esm/types/facade-iterable-paging.js +0 -1
  36. package/lib-esm/types/facade-iterable-paging.js.map +0 -1
  37. package/lib-esm/types/facade-light-flattening.d.ts +0 -84
  38. package/lib-esm/types/facade-light-flattening.js +0 -1
  39. package/lib-esm/types/facade-light-flattening.js.map +0 -1
  40. package/lib-esm/types/facade-no-flattening.d.ts +0 -48
  41. package/lib-esm/types/facade-no-flattening.js +0 -1
  42. package/lib-esm/types/facade-no-flattening.js.map +0 -1
  43. package/src/facade-iterable-paging.ts +0 -150
  44. package/src/facade-light-flattening.ts +0 -139
  45. package/src/facade-no-flattening.ts +0 -100
  46. package/src/types/facade-iterable-paging.ts +0 -200
  47. package/src/types/facade-light-flattening.ts +0 -171
  48. package/src/types/facade-no-flattening.ts +0 -110
@@ -1,150 +0,0 @@
1
- import { GraphQLAPI } from './GraphQLAPI';
2
- import { Observable } from 'zen-observable-ts';
3
- import { parse, print, OperationDefinitionNode } from 'graphql';
4
-
5
- /**
6
- * `GraphQLOptions` currently includes `{ query: string | DocumentNode, ... }`, but I'm thinking
7
- * we swap that for `query: string` or `query: string | T extends Whatever`.
8
- */
9
- import { GraphQLOptions } from './types';
10
-
11
- import {
12
- GraphQLResult,
13
- GraphqlQueryParams,
14
- GraphqlQueryResult,
15
- GraphqlMutationParams,
16
- GraphqlMutationResult,
17
- GraphqlSubscriptionParams,
18
- GraphqlSubscriptionResult,
19
- } from './types/facade-iterable-paging';
20
-
21
- export function graphql<T = any>(
22
- options: GraphQLOptions,
23
- additionalHeaders?: { [key: string]: string }
24
- ): Observable<GraphqlSubscriptionResult<'', T>> | Promise<GraphQLResult<T>> {
25
- const parsedQuery =
26
- typeof options.query === 'string'
27
- ? parse(options.query)
28
- : parse(print(options.query));
29
-
30
- const [operationDef = {}] = parsedQuery.definitions.filter(
31
- def => def.kind === 'OperationDefinition'
32
- );
33
- const { operation: operationType } = operationDef as OperationDefinitionNode;
34
-
35
- const childOptions = {
36
- ...options,
37
- query: print(parsedQuery),
38
- } as any;
39
-
40
- switch (operationType) {
41
- case 'query':
42
- return query(childOptions.query, childOptions, additionalHeaders);
43
- case 'mutation':
44
- return mutate(childOptions.query, childOptions, additionalHeaders);
45
- case 'subscription':
46
- return subscribe(childOptions.query, childOptions, additionalHeaders);
47
- default:
48
- throw new Error(`invalid operation type: ${operationType}`);
49
- }
50
- }
51
-
52
- export function query<
53
- FALLBACK_TYPES = unknown,
54
- TYPED_GQL_STRING extends string = string
55
- >(
56
- document: TYPED_GQL_STRING,
57
- queryParams?: GraphqlQueryParams<TYPED_GQL_STRING, FALLBACK_TYPES>,
58
- additionalHeaders?: { [key: string]: string }
59
- ): Promise<GraphqlQueryResult<TYPED_GQL_STRING, FALLBACK_TYPES>> {
60
- return (
61
- GraphQLAPI.graphql(
62
- {
63
- ...((queryParams || {}) as any),
64
- query: document,
65
- },
66
- additionalHeaders
67
- ) as any
68
- ).then(raw => {
69
- const responseKey = raw.data ? Object.keys(raw.data)[0] : undefined;
70
- if (responseKey) {
71
- if (Array.isArray(raw.data[responseKey]?.items)) {
72
- return {
73
- data: (async function* _() {
74
- for (const item of raw.data[responseKey]?.items) {
75
- yield item;
76
- }
77
- })(),
78
- errors: raw.errors,
79
- };
80
- } else {
81
- return {
82
- data: raw.data[responseKey],
83
- errors: raw.errors,
84
- };
85
- }
86
- } else {
87
- return raw;
88
- }
89
- }) as Promise<GraphqlQueryResult<TYPED_GQL_STRING, FALLBACK_TYPES>>;
90
- }
91
-
92
- export function mutate<
93
- FALLBACK_TYPES = unknown,
94
- TYPED_GQL_STRING extends string = string
95
- >(
96
- document: TYPED_GQL_STRING,
97
- queryParams?: GraphqlMutationParams<TYPED_GQL_STRING, FALLBACK_TYPES>,
98
- additionalHeaders?: { [key: string]: string }
99
- ): Promise<GraphqlMutationResult<TYPED_GQL_STRING, FALLBACK_TYPES>> {
100
- return (
101
- GraphQLAPI.graphql(
102
- {
103
- ...((queryParams || {}) as any),
104
- query: document,
105
- },
106
- additionalHeaders
107
- ) as any
108
- ).then(raw => {
109
- const responseKey = raw.data ? Object.keys(raw.data)[0] : undefined;
110
- if (responseKey) {
111
- return {
112
- data: raw.data[responseKey],
113
- errors: raw.errors,
114
- };
115
- } else {
116
- return raw;
117
- }
118
- }) as Promise<GraphqlMutationResult<TYPED_GQL_STRING, FALLBACK_TYPES>>;
119
- }
120
-
121
- export function subscribe<
122
- FALLBACK_TYPES = unknown,
123
- TYPED_GQL_STRING extends string = string
124
- >(
125
- document: TYPED_GQL_STRING,
126
- queryParams?: GraphqlSubscriptionParams<TYPED_GQL_STRING, FALLBACK_TYPES>,
127
- additionalHeaders?: { [key: string]: string }
128
- ): Observable<GraphqlSubscriptionResult<TYPED_GQL_STRING, FALLBACK_TYPES>> {
129
- return (
130
- GraphQLAPI.graphql(
131
- {
132
- ...((queryParams || {}) as any),
133
- query: document,
134
- },
135
- additionalHeaders
136
- ) as Observable<any>
137
- ).map(raw => {
138
- const messageKey = raw.value.data
139
- ? Object.keys(raw.value.data)[0]
140
- : undefined;
141
- return {
142
- value: {
143
- data: messageKey ? raw.value.data[messageKey] : undefined,
144
- provider: raw.provider,
145
- },
146
- };
147
- }) as unknown as Observable<
148
- GraphqlSubscriptionResult<TYPED_GQL_STRING, FALLBACK_TYPES>
149
- >;
150
- }
@@ -1,139 +0,0 @@
1
- import { GraphQLAPI } from './GraphQLAPI';
2
- import { Observable } from 'zen-observable-ts';
3
- import { parse, print, OperationDefinitionNode } from 'graphql';
4
-
5
- /**
6
- * `GraphQLOptions` currently includes `{ query: string | DocumentNode, ... }`, but I'm thinking
7
- * we swap that for `query: string` or `query: string | T extends Whatever`.
8
- */
9
- import { GraphQLOptions } from './types';
10
-
11
- import {
12
- GraphQLResult,
13
- GraphqlQueryParams,
14
- GraphqlQueryResult,
15
- GraphqlMutationParams,
16
- GraphqlMutationResult,
17
- GraphqlSubscriptionParams,
18
- GraphqlSubscriptionResult,
19
- } from './types/facade-light-flattening';
20
-
21
- export function graphql<T = any>(
22
- options: GraphQLOptions,
23
- additionalHeaders?: { [key: string]: string }
24
- ): Observable<GraphqlSubscriptionResult<'', T>> | Promise<GraphQLResult<T>> {
25
- const parsedQuery =
26
- typeof options.query === 'string'
27
- ? parse(options.query)
28
- : parse(print(options.query));
29
-
30
- const [operationDef = {}] = parsedQuery.definitions.filter(
31
- def => def.kind === 'OperationDefinition'
32
- );
33
- const { operation: operationType } = operationDef as OperationDefinitionNode;
34
-
35
- const childOptions = {
36
- ...options,
37
- query: print(parsedQuery),
38
- } as any;
39
-
40
- switch (operationType) {
41
- case 'query':
42
- return query(childOptions.query, childOptions, additionalHeaders);
43
- case 'mutation':
44
- return mutate(childOptions.query, childOptions, additionalHeaders);
45
- case 'subscription':
46
- return subscribe(childOptions.query, childOptions, additionalHeaders);
47
- default:
48
- throw new Error(`invalid operation type: ${operationType}`);
49
- }
50
- }
51
-
52
- export function query<
53
- FALLBACK_TYPES = unknown,
54
- TYPED_GQL_STRING extends string = string
55
- >(
56
- document: TYPED_GQL_STRING,
57
- queryParams?: GraphqlQueryParams<TYPED_GQL_STRING, FALLBACK_TYPES>,
58
- additionalHeaders?: { [key: string]: string }
59
- ): Promise<GraphqlQueryResult<TYPED_GQL_STRING, FALLBACK_TYPES>> {
60
- return (
61
- GraphQLAPI.graphql(
62
- {
63
- ...((queryParams || {}) as any),
64
- query: document,
65
- },
66
- additionalHeaders
67
- ) as any
68
- ).then(raw => {
69
- const responseKey = raw.data ? Object.keys(raw.data)[0] : undefined;
70
- if (responseKey) {
71
- return {
72
- data: raw.data[responseKey],
73
- errors: raw.errors,
74
- };
75
- } else {
76
- return raw;
77
- }
78
- }) as Promise<GraphqlQueryResult<TYPED_GQL_STRING, FALLBACK_TYPES>>;
79
- }
80
-
81
- export function mutate<
82
- FALLBACK_TYPES = unknown,
83
- TYPED_GQL_STRING extends string = string
84
- >(
85
- document: TYPED_GQL_STRING,
86
- queryParams?: GraphqlMutationParams<TYPED_GQL_STRING, FALLBACK_TYPES>,
87
- additionalHeaders?: { [key: string]: string }
88
- ): Promise<GraphqlMutationResult<TYPED_GQL_STRING, FALLBACK_TYPES>> {
89
- return (
90
- GraphQLAPI.graphql(
91
- {
92
- ...((queryParams || {}) as any),
93
- query: document,
94
- },
95
- additionalHeaders
96
- ) as any
97
- ).then(raw => {
98
- const responseKey = raw.data ? Object.keys(raw.data)[0] : undefined;
99
- if (responseKey) {
100
- return {
101
- data: raw.data[responseKey],
102
- errors: raw.errors,
103
- };
104
- } else {
105
- return raw;
106
- }
107
- }) as Promise<GraphqlMutationResult<TYPED_GQL_STRING, FALLBACK_TYPES>>;
108
- }
109
-
110
- export function subscribe<
111
- FALLBACK_TYPES = unknown,
112
- TYPED_GQL_STRING extends string = string
113
- >(
114
- document: TYPED_GQL_STRING,
115
- queryParams?: GraphqlSubscriptionParams<TYPED_GQL_STRING, FALLBACK_TYPES>,
116
- additionalHeaders?: { [key: string]: string }
117
- ): Observable<GraphqlSubscriptionResult<TYPED_GQL_STRING, FALLBACK_TYPES>> {
118
- return (
119
- GraphQLAPI.graphql(
120
- {
121
- ...((queryParams || {}) as any),
122
- query: document,
123
- },
124
- additionalHeaders
125
- ) as Observable<any>
126
- ).map(raw => {
127
- const messageKey = raw.value.data
128
- ? Object.keys(raw.value.data)[0]
129
- : undefined;
130
- return {
131
- value: {
132
- data: messageKey ? raw.value.data[messageKey] : undefined,
133
- provider: raw.provider,
134
- },
135
- };
136
- }) as unknown as Observable<
137
- GraphqlSubscriptionResult<TYPED_GQL_STRING, FALLBACK_TYPES>
138
- >;
139
- }
@@ -1,100 +0,0 @@
1
- import { GraphQLAPI } from './GraphQLAPI';
2
- import { Observable } from 'zen-observable-ts';
3
- import { parse, print, OperationDefinitionNode } from 'graphql';
4
-
5
- /**
6
- * `GraphQLOptions` currently includes `{ query: string | DocumentNode, ... }`, but I'm thinking
7
- * we swap that for `query: string` or `query: string | T extends Whatever`.
8
- */
9
- import { GraphQLOptions, GraphQLResult } from './types';
10
-
11
- import {
12
- GraphqlQueryParams,
13
- GraphqlQueryResult,
14
- GraphqlMutationParams,
15
- GraphqlMutationResult,
16
- GraphqlSubscriptionParams,
17
- GraphqlSubscriptionResult,
18
- } from './types/facade-no-flattening';
19
-
20
- export function graphql<T = any>(
21
- options: GraphQLOptions,
22
- additionalHeaders?: { [key: string]: string }
23
- ): Observable<GraphqlSubscriptionResult<'', T>> | Promise<GraphQLResult<T>> {
24
- const parsedQuery =
25
- typeof options.query === 'string'
26
- ? parse(options.query)
27
- : parse(print(options.query));
28
-
29
- const [operationDef = {}] = parsedQuery.definitions.filter(
30
- def => def.kind === 'OperationDefinition'
31
- );
32
- const { operation: operationType } = operationDef as OperationDefinitionNode;
33
-
34
- const childOptions = {
35
- ...options,
36
- query: print(parsedQuery),
37
- } as any; // todo
38
-
39
- switch (operationType) {
40
- case 'query':
41
- return query(childOptions.query, childOptions, additionalHeaders);
42
- case 'mutation':
43
- return mutate(childOptions.query, childOptions, additionalHeaders);
44
- case 'subscription':
45
- return subscribe(childOptions.query, childOptions, additionalHeaders);
46
- default:
47
- throw new Error(`invalid operation type: ${operationType}`);
48
- }
49
- }
50
-
51
- export function query<
52
- FALLBACK_TYPES = unknown,
53
- TYPED_GQL_STRING extends string = string
54
- >(
55
- document: TYPED_GQL_STRING,
56
- queryParams?: GraphqlQueryParams<TYPED_GQL_STRING, FALLBACK_TYPES>,
57
- additionalHeaders?: { [key: string]: string }
58
- ): Promise<GraphqlQueryResult<TYPED_GQL_STRING, FALLBACK_TYPES>> {
59
- return GraphQLAPI.graphql(
60
- {
61
- ...((queryParams || {}) as any), // todo
62
- query: document,
63
- },
64
- additionalHeaders
65
- ) as Promise<GraphqlQueryResult<TYPED_GQL_STRING, FALLBACK_TYPES>>;
66
- }
67
-
68
- export function mutate<
69
- FALLBACK_TYPES = unknown,
70
- TYPED_GQL_STRING extends string = string
71
- >(
72
- document: TYPED_GQL_STRING,
73
- queryParams?: GraphqlMutationParams<TYPED_GQL_STRING, FALLBACK_TYPES>,
74
- additionalHeaders?: { [key: string]: string }
75
- ): Promise<GraphqlMutationResult<TYPED_GQL_STRING, FALLBACK_TYPES>> {
76
- return GraphQLAPI.graphql(
77
- {
78
- ...((queryParams || {}) as any), // todo
79
- query: document,
80
- },
81
- additionalHeaders
82
- ) as Promise<GraphqlMutationResult<TYPED_GQL_STRING, FALLBACK_TYPES>>;
83
- }
84
-
85
- export function subscribe<
86
- FALLBACK_TYPES = unknown,
87
- TYPED_GQL_STRING extends string = string
88
- >(
89
- document: TYPED_GQL_STRING,
90
- queryParams?: GraphqlSubscriptionParams<TYPED_GQL_STRING, FALLBACK_TYPES>,
91
- additionalHeaders?: { [key: string]: string }
92
- ): Observable<GraphqlSubscriptionResult<TYPED_GQL_STRING, FALLBACK_TYPES>> {
93
- return GraphQLAPI.graphql(
94
- {
95
- ...((queryParams || {}) as any), // todo
96
- query: document,
97
- },
98
- additionalHeaders
99
- ) as Observable<GraphqlSubscriptionResult<TYPED_GQL_STRING, FALLBACK_TYPES>>;
100
- }
@@ -1,200 +0,0 @@
1
- // import { Observable } from 'zen-observable-ts';
2
- // import { GraphQLOptions } from './index';
3
- import { GraphQLError } from 'graphql';
4
- import { Auth, API } from 'aws-amplify';
5
-
6
- // #region shared API types ... probably to be pulled from core or something later.
7
-
8
- // original
9
- // export interface GraphQLResult<T = object> {
10
- // data?: T;
11
- // errors?: GraphQLError[];
12
- // extensions?: {
13
- // [key: string]: any;
14
- // };
15
- // }
16
-
17
- /**
18
- *
19
- * ```
20
- * type T = UnionOfKeysOf<{x: string, y: string}>;
21
- * ^
22
- * "x" | "y"
23
- * ```
24
- */
25
- type UnionOfKeysOf<T> = {
26
- [K in keyof T]: T extends Record<K, any> ? K : never;
27
- }[keyof T];
28
-
29
- /**
30
- * Digs down a layer into an object to extract a union of all the property
31
- * types.
32
- *
33
- * ```
34
- * type T = Dig<{ x: { a: string, b: number }, y: { c: boolean } }>;
35
- * ^
36
- * {
37
- * a: string;
38
- * b: number;
39
- * } | {
40
- * c: boolean;
41
- * }
42
- * ```
43
- *
44
- * This is particularly useful for extracting the type when a single property
45
- * exists on an object and we just want to "skip" it or "dig it out".
46
- *
47
- * ```
48
- * type T = Dig<{x: { a: string, b: number }}>;
49
- * ^
50
- * {
51
- * a: string;
52
- * b: number;
53
- * }
54
- * ```
55
- *
56
- */
57
- type Dig<T> = T[keyof T];
58
-
59
- type Iterated<T> = T extends Array<infer IT>
60
- ? AsyncGenerator<Exclude<IT, null>>
61
- : T;
62
-
63
- type WithIterablesInsteadOfArrays<T> = T extends { items: infer IT }
64
- ? Iterated<IT>
65
- : T;
66
-
67
- export type GraphQLResult<T = object> = {
68
- data: WithIterablesInsteadOfArrays<Dig<T>>;
69
- errors?: GraphQLError[];
70
- extensions?: {
71
- [key: string]: any;
72
- };
73
- };
74
-
75
- type UnionKeys<T> = T extends T ? keyof T : never;
76
- type StrictUnionHelper<T, TAll> = T extends any
77
- ? T & Partial<Record<Exclude<UnionKeys<TAll>, keyof T>, undefined>>
78
- : never;
79
- export type StrictUnion<T> = StrictUnionHelper<T, T>;
80
- export type SimpleAuthMode = {
81
- authMode?: 'AMAZON_COGNITO_USERPOOLS' | 'API_KEY' | 'AWS_IAM';
82
- };
83
-
84
- export type LambdaAuthMode = {
85
- authMode: 'AWS_LAMBDA';
86
- authToken: string;
87
- };
88
-
89
- export type AuthMode = StrictUnion<SimpleAuthMode | LambdaAuthMode>;
90
-
91
- // #endregion
92
-
93
- export type GeneratedQuery<InputType, OutputType> = string & {
94
- __generatedQueryInput: InputType;
95
- __generatedQueryOutput: OutputType;
96
- };
97
-
98
- export type GraphqlQueryOverrides<IN extends {}, OUT extends {}> = {
99
- variables: IN;
100
- result: OUT;
101
- };
102
-
103
- export type GraphqlQueryParams<
104
- TYPED_GQL_STRING extends string,
105
- FALLBACK_TYPES
106
- > = AuthMode & {
107
- variables: TYPED_GQL_STRING extends GeneratedQuery<infer IN, infer OUT>
108
- ? IN
109
- : FALLBACK_TYPES extends GraphqlQueryOverrides<infer IN, infer OUT>
110
- ? IN
111
- : any;
112
- };
113
-
114
- export type GraphqlQueryResult<T extends string, S> = T extends GeneratedQuery<
115
- infer IN,
116
- infer OUT
117
- >
118
- ? GraphQLResult<OUT>
119
- : S extends GraphqlQueryOverrides<infer IN, infer OUT>
120
- ? GraphQLResult<OUT>
121
- : any;
122
-
123
- // e.g.
124
- export type ListThreadsQuery = {
125
- listThreads?: {
126
- __typename: 'ModelThreadConnection';
127
- items: Array<{
128
- __typename: 'Thread';
129
- id: string;
130
- topic?: string | null;
131
- comments?: {
132
- __typename: 'ModelCommentConnection';
133
- nextToken?: string | null;
134
- } | null;
135
- createdAt?: string | null;
136
- updatedAt: string;
137
- owner?: string | null;
138
- } | null>;
139
- nextToken?: string | null;
140
- } | null;
141
- };
142
-
143
- /** GraphQL mutate */
144
-
145
- export type GeneratedMutation<InputType, OutputType> = string & {
146
- __generatedMutationInput: InputType;
147
- __generatedMutationOutput: OutputType;
148
- };
149
-
150
- export type GraphqlMutationParams<
151
- TYPED_GQL_STRING extends string,
152
- OVERRIDE_TYPE
153
- > = AuthMode & {
154
- variables: TYPED_GQL_STRING extends GeneratedMutation<infer IN, infer OUT>
155
- ? IN
156
- : OVERRIDE_TYPE extends GraphqlQueryOverrides<infer OVERRIDE_IN, infer OUT>
157
- ? OVERRIDE_IN
158
- : any;
159
- };
160
-
161
- export type GraphqlMutationResult<
162
- TYPED_GQL_STRING extends string,
163
- FALLBACK_TYPES
164
- > = TYPED_GQL_STRING extends GeneratedMutation<infer IN, infer OUT>
165
- ? GraphQLResult<OUT>
166
- : FALLBACK_TYPES extends GraphqlQueryOverrides<infer IN, infer OUT>
167
- ? GraphQLResult<OUT>
168
- : any;
169
-
170
- /** GraphQL subscribe */
171
-
172
- export type GeneratedSubscription<InputType, OutputType> = string & {
173
- __generatedSubscriptionInput: InputType;
174
- __generatedSubscriptionOutput: OutputType;
175
- };
176
-
177
- export type GraphqlSubscriptionParams<
178
- TYPED_GQL_STRING extends string,
179
- FALLBACK_TYPES
180
- > = AuthMode & {
181
- variables: TYPED_GQL_STRING extends GeneratedSubscription<infer IN, infer OUT>
182
- ? IN
183
- : FALLBACK_TYPES extends GraphqlQueryOverrides<infer IN, infer OUT>
184
- ? IN
185
- : any;
186
- };
187
-
188
- export type GraphqlSubscriptionResult<
189
- TYPED_GQL_STRING extends string,
190
- FALLBACK_TYPES
191
- > = {
192
- value: {
193
- data: TYPED_GQL_STRING extends GeneratedSubscription<infer IN, infer OUT>
194
- ? Dig<OUT>
195
- : FALLBACK_TYPES extends GraphqlQueryOverrides<infer IN, infer OUT>
196
- ? Dig<OUT>
197
- : any;
198
- };
199
- provider: any;
200
- };