@aws-amplify/api-graphql 4.0.4-unstable.4d80239.0 → 4.0.4

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.4-unstable.4d80239.0+4d80239",
3
+ "version": "4.0.4",
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.4-unstable.4d80239.0+4d80239",
83
- "@aws-amplify/core": "6.0.4-unstable.4d80239.0+4d80239",
82
+ "@aws-amplify/api-rest": "4.0.4",
83
+ "@aws-amplify/core": "6.0.4",
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": "4d802390635cd931e23091007d42559ec13031e9"
149
+ "gitHead": "0a6bc80a5e2bbd9b6f0c8815f13e227cc54b7da1"
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 {
@@ -15,7 +15,7 @@ export function generateModelsProperty<
15
15
  | V6ClientSSRRequest<Record<string, any>>
16
16
  | V6ClientSSRCookies<Record<string, any>> = V6ClientSSRCookies<
17
17
  Record<string, any>
18
- >,
18
+ >
19
19
  >(client: ClientType, params: ServerClientGenerationParams): ClientType {
20
20
  const models = {} as any;
21
21
  const config = params.config;
@@ -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,23 +251,20 @@ 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<
266
- infer IN,
267
- infer CUSTOM_OUT
268
- >
269
- ? CUSTOM_OUT
270
- : 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<infer IN, infer CUSTOM_OUT>
266
+ ? CUSTOM_OUT
267
+ : UnknownGraphQLResponse;
271
268
 
272
269
  /**
273
270
  * The shape customers can use to provide `T` to `graphql<T>()` to specify both
@@ -410,7 +407,7 @@ export type V6ClientSSRCookies<T extends Record<any, any> = never> =
410
407
 
411
408
  export type GraphQLMethod = <
412
409
  FALLBACK_TYPES = unknown,
413
- TYPED_GQL_STRING extends string = string,
410
+ TYPED_GQL_STRING extends string = string
414
411
  >(
415
412
  options: GraphQLOptionsV6<FALLBACK_TYPES, TYPED_GQL_STRING>,
416
413
  additionalHeaders?: CustomHeaders | undefined
@@ -418,7 +415,7 @@ export type GraphQLMethod = <
418
415
 
419
416
  export type GraphQLMethodSSR = <
420
417
  FALLBACK_TYPES = unknown,
421
- TYPED_GQL_STRING extends string = string,
418
+ TYPED_GQL_STRING extends string = string
422
419
  >(
423
420
  contextSpec: AmplifyServer.ContextSpec,
424
421
  options: GraphQLOptionsV6<FALLBACK_TYPES, TYPED_GQL_STRING>,