@aws-amplify/data-schema 0.14.0 → 0.14.1
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.
|
@@ -37,7 +37,7 @@ type InternalCustomData = CustomData & {
|
|
|
37
37
|
authorization: Authorization<any, any, any>[];
|
|
38
38
|
};
|
|
39
39
|
export type CustomOperationParamShape = {
|
|
40
|
-
arguments: CustomArguments;
|
|
40
|
+
arguments: CustomArguments | null;
|
|
41
41
|
returnType: CustomReturnType | null;
|
|
42
42
|
functionRef: string | null;
|
|
43
43
|
authorization: Authorization<any, any, any>[];
|
|
@@ -69,7 +69,7 @@ export type InternalCustom<B extends CustomOperationBrand = any> = CustomOperati
|
|
|
69
69
|
};
|
|
70
70
|
export type QueryCustomOperation = CustomOperation<CustomOperationParamShape, any, typeof queryBrand>;
|
|
71
71
|
export declare function query(): CustomOperation<{
|
|
72
|
-
arguments:
|
|
72
|
+
arguments: null;
|
|
73
73
|
returnType: null;
|
|
74
74
|
functionRef: null;
|
|
75
75
|
authorization: [];
|
|
@@ -78,7 +78,7 @@ export declare function query(): CustomOperation<{
|
|
|
78
78
|
}, never, typeof queryBrand>;
|
|
79
79
|
export type MutationCustomOperation = CustomOperation<CustomOperationParamShape, any, typeof mutationBrand>;
|
|
80
80
|
export declare function mutation(): CustomOperation<{
|
|
81
|
-
arguments:
|
|
81
|
+
arguments: null;
|
|
82
82
|
returnType: null;
|
|
83
83
|
functionRef: null;
|
|
84
84
|
authorization: [];
|
|
@@ -87,7 +87,7 @@ export declare function mutation(): CustomOperation<{
|
|
|
87
87
|
}, never, typeof mutationBrand>;
|
|
88
88
|
export type SubscriptionCustomOperation = CustomOperation<CustomOperationParamShape, any, typeof subscriptionBrand>;
|
|
89
89
|
export declare function subscription(): CustomOperation<{
|
|
90
|
-
arguments:
|
|
90
|
+
arguments: null;
|
|
91
91
|
returnType: null;
|
|
92
92
|
functionRef: null;
|
|
93
93
|
authorization: [];
|
|
@@ -28,7 +28,7 @@ export type CustomOpShapes<Schema extends GenericModelSchema<any>> = {
|
|
|
28
28
|
/**
|
|
29
29
|
* Digs out custom operation arguments, mapped to the intended graphql types.
|
|
30
30
|
*/
|
|
31
|
-
export type CustomOpArguments<Shape extends CustomOperationParamShape> = {
|
|
31
|
+
export type CustomOpArguments<Shape extends CustomOperationParamShape> = Shape['arguments'] extends null ? never : {
|
|
32
32
|
[FieldName in keyof Shape['arguments']]: Shape['arguments'][FieldName] extends ModelField<infer R, any, any> ? R : never;
|
|
33
33
|
};
|
|
34
34
|
/**
|