@aws-amplify/api-graphql 4.0.5 → 4.0.6-unstable.f2b7a8d.0

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/api-graphql",
3
- "version": "4.0.5",
3
+ "version": "4.0.6-unstable.f2b7a8d.0+f2b7a8d",
4
4
  "description": "Api-graphql category of aws-amplify",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.mjs",
@@ -79,8 +79,8 @@
79
79
  "internals"
80
80
  ],
81
81
  "dependencies": {
82
- "@aws-amplify/api-rest": "4.0.5",
83
- "@aws-amplify/core": "6.0.5",
82
+ "@aws-amplify/api-rest": "4.0.6-unstable.f2b7a8d.0+f2b7a8d",
83
+ "@aws-amplify/core": "6.0.6-unstable.f2b7a8d.0+f2b7a8d",
84
84
  "@aws-amplify/data-schema-types": "^0.6.6",
85
85
  "@aws-sdk/types": "3.387.0",
86
86
  "graphql": "15.8.0",
@@ -146,5 +146,5 @@
146
146
  "<rootDir>/__tests__"
147
147
  ]
148
148
  },
149
- "gitHead": "1c545f4a0c111245a66d489aeb01a0c0f78cf7cb"
149
+ "gitHead": "f2b7a8d78058af2e1c04f7d507525641def667c3"
150
150
  }
@@ -26,7 +26,7 @@ export function generateClient<
26
26
  T extends Record<any, any> = never,
27
27
  ClientType extends
28
28
  | V6ClientSSRRequest<T>
29
- | V6ClientSSRCookies<T> = V6ClientSSRCookies<T>
29
+ | V6ClientSSRCookies<T> = V6ClientSSRCookies<T>,
30
30
  >(
31
31
  params: ServerClientGenerationParams & CommonPublicClientOptions
32
32
  ): ClientType {
@@ -97,7 +97,7 @@ import { CustomHeaders } from '@aws-amplify/data-schema-types';
97
97
  */
98
98
  export function graphql<
99
99
  FALLBACK_TYPES = unknown,
100
- TYPED_GQL_STRING extends string = string
100
+ TYPED_GQL_STRING extends string = string,
101
101
  >(
102
102
  this: V6Client,
103
103
  options: GraphQLOptionsV6<FALLBACK_TYPES, TYPED_GQL_STRING>,
@@ -96,10 +96,10 @@ type PagedList<T, TYPENAME> = {
96
96
  type WithListsFixed<T> = T extends PagedList<infer IT, infer NAME>
97
97
  ? PagedList<Exclude<IT, null | undefined>, NAME>
98
98
  : T extends {}
99
- ? {
100
- [K in keyof T]: WithListsFixed<T[K]>;
101
- }
102
- : T;
99
+ ? {
100
+ [K in keyof T]: WithListsFixed<T[K]>;
101
+ }
102
+ : T;
103
103
 
104
104
  /**
105
105
  * Returns an updated response type to always return a value.
@@ -205,7 +205,7 @@ export type GraphQLOperation = Source | string;
205
205
  */
206
206
  export interface GraphQLOptionsV6<
207
207
  FALLBACK_TYPES = unknown,
208
- TYPED_GQL_STRING extends string = string
208
+ TYPED_GQL_STRING extends string = string,
209
209
  > {
210
210
  query: TYPED_GQL_STRING | DocumentNode;
211
211
  variables?: GraphQLVariablesV6<FALLBACK_TYPES, TYPED_GQL_STRING>;
@@ -234,16 +234,16 @@ export type UnknownGraphQLResponse =
234
234
  */
235
235
  export type GraphQLVariablesV6<
236
236
  FALLBACK_TYPES = unknown,
237
- TYPED_GQL_STRING extends string = string
237
+ TYPED_GQL_STRING extends string = string,
238
238
  > = TYPED_GQL_STRING extends GeneratedQuery<infer IN, any>
239
239
  ? IN
240
240
  : TYPED_GQL_STRING extends GeneratedMutation<infer IN, any>
241
- ? IN
242
- : TYPED_GQL_STRING extends GeneratedSubscription<infer IN, any>
243
- ? IN
244
- : FALLBACK_TYPES extends GraphQLOperationType<infer IN, any>
245
- ? IN
246
- : any;
241
+ ? IN
242
+ : TYPED_GQL_STRING extends GeneratedSubscription<infer IN, any>
243
+ ? IN
244
+ : FALLBACK_TYPES extends GraphQLOperationType<infer IN, any>
245
+ ? IN
246
+ : any;
247
247
 
248
248
  /**
249
249
  * The expected return type with respect to the given `FALLBACK_TYPE`
@@ -251,20 +251,23 @@ export type GraphQLVariablesV6<
251
251
  */
252
252
  export type GraphQLResponseV6<
253
253
  FALLBACK_TYPE = unknown,
254
- TYPED_GQL_STRING extends string = string
254
+ TYPED_GQL_STRING extends string = string,
255
255
  > = TYPED_GQL_STRING extends GeneratedQuery<infer IN, infer QUERY_OUT>
256
256
  ? Promise<GraphQLResult<FixedQueryResult<QUERY_OUT>>>
257
257
  : TYPED_GQL_STRING extends GeneratedMutation<infer IN, infer MUTATION_OUT>
258
- ? Promise<GraphQLResult<NeverEmpty<MUTATION_OUT>>>
259
- : TYPED_GQL_STRING extends GeneratedSubscription<infer IN, infer SUB_OUT>
260
- ? GraphqlSubscriptionResult<NeverEmpty<SUB_OUT>>
261
- : FALLBACK_TYPE extends GraphQLQuery<infer T>
262
- ? Promise<GraphQLResult<FALLBACK_TYPE>>
263
- : FALLBACK_TYPE extends GraphQLSubscription<infer T>
264
- ? GraphqlSubscriptionResult<FALLBACK_TYPE>
265
- : FALLBACK_TYPE extends GraphQLOperationType<infer IN, infer CUSTOM_OUT>
266
- ? CUSTOM_OUT
267
- : UnknownGraphQLResponse;
258
+ ? Promise<GraphQLResult<NeverEmpty<MUTATION_OUT>>>
259
+ : TYPED_GQL_STRING extends GeneratedSubscription<infer IN, infer SUB_OUT>
260
+ ? GraphqlSubscriptionResult<NeverEmpty<SUB_OUT>>
261
+ : FALLBACK_TYPE extends GraphQLQuery<infer T>
262
+ ? Promise<GraphQLResult<FALLBACK_TYPE>>
263
+ : FALLBACK_TYPE extends GraphQLSubscription<infer T>
264
+ ? GraphqlSubscriptionResult<FALLBACK_TYPE>
265
+ : FALLBACK_TYPE extends GraphQLOperationType<
266
+ infer IN,
267
+ infer CUSTOM_OUT
268
+ >
269
+ ? CUSTOM_OUT
270
+ : UnknownGraphQLResponse;
268
271
 
269
272
  /**
270
273
  * The shape customers can use to provide `T` to `graphql<T>()` to specify both
@@ -407,7 +410,7 @@ export type V6ClientSSRCookies<T extends Record<any, any> = never> =
407
410
 
408
411
  export type GraphQLMethod = <
409
412
  FALLBACK_TYPES = unknown,
410
- TYPED_GQL_STRING extends string = string
413
+ TYPED_GQL_STRING extends string = string,
411
414
  >(
412
415
  options: GraphQLOptionsV6<FALLBACK_TYPES, TYPED_GQL_STRING>,
413
416
  additionalHeaders?: CustomHeaders | undefined
@@ -415,7 +418,7 @@ export type GraphQLMethod = <
415
418
 
416
419
  export type GraphQLMethodSSR = <
417
420
  FALLBACK_TYPES = unknown,
418
- TYPED_GQL_STRING extends string = string
421
+ TYPED_GQL_STRING extends string = string,
419
422
  >(
420
423
  contextSpec: AmplifyServer.ContextSpec,
421
424
  options: GraphQLOptionsV6<FALLBACK_TYPES, TYPED_GQL_STRING>,