@constructive-io/graphql-codegen 2.28.0 → 2.28.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.
package/cli/codegen/gql-ast.js
CHANGED
package/cli/codegen/mutations.js
CHANGED
|
@@ -415,10 +415,9 @@ function generateDeleteMutationHook(table, options = {}) {
|
|
|
415
415
|
]);
|
|
416
416
|
const variablesInterface = t.tsInterfaceDeclaration(t.identifier(`${(0, utils_1.ucFirst)(mutationName)}MutationVariables`), null, null, variablesInterfaceBody);
|
|
417
417
|
statements.push(t.exportNamedDeclaration(variablesInterface));
|
|
418
|
-
const deletedPkProp = t.tsPropertySignature(t.identifier(`deleted${(0, utils_1.ucFirst)(pkField.name)}`), t.tsTypeAnnotation(t.tsUnionType([pkTypeAnnotation, t.tsNullKeyword()])));
|
|
419
418
|
const clientMutationIdProp = t.tsPropertySignature(t.identifier('clientMutationId'), t.tsTypeAnnotation(t.tsUnionType([t.tsStringKeyword(), t.tsNullKeyword()])));
|
|
420
419
|
const resultInterfaceBody = t.tsInterfaceBody([
|
|
421
|
-
t.tsPropertySignature(t.identifier(mutationName), t.tsTypeAnnotation(t.tsTypeLiteral([clientMutationIdProp
|
|
420
|
+
t.tsPropertySignature(t.identifier(mutationName), t.tsTypeAnnotation(t.tsTypeLiteral([clientMutationIdProp]))),
|
|
422
421
|
]);
|
|
423
422
|
const resultInterface = t.tsInterfaceDeclaration(t.identifier(`${(0, utils_1.ucFirst)(mutationName)}MutationResult`), null, null, resultInterfaceBody);
|
|
424
423
|
statements.push(t.exportNamedDeclaration(resultInterface));
|
|
@@ -376,10 +376,9 @@ export function generateDeleteMutationHook(table, options = {}) {
|
|
|
376
376
|
]);
|
|
377
377
|
const variablesInterface = t.tsInterfaceDeclaration(t.identifier(`${ucFirst(mutationName)}MutationVariables`), null, null, variablesInterfaceBody);
|
|
378
378
|
statements.push(t.exportNamedDeclaration(variablesInterface));
|
|
379
|
-
const deletedPkProp = t.tsPropertySignature(t.identifier(`deleted${ucFirst(pkField.name)}`), t.tsTypeAnnotation(t.tsUnionType([pkTypeAnnotation, t.tsNullKeyword()])));
|
|
380
379
|
const clientMutationIdProp = t.tsPropertySignature(t.identifier('clientMutationId'), t.tsTypeAnnotation(t.tsUnionType([t.tsStringKeyword(), t.tsNullKeyword()])));
|
|
381
380
|
const resultInterfaceBody = t.tsInterfaceBody([
|
|
382
|
-
t.tsPropertySignature(t.identifier(mutationName), t.tsTypeAnnotation(t.tsTypeLiteral([clientMutationIdProp
|
|
381
|
+
t.tsPropertySignature(t.identifier(mutationName), t.tsTypeAnnotation(t.tsTypeLiteral([clientMutationIdProp]))),
|
|
383
382
|
]);
|
|
384
383
|
const resultInterface = t.tsInterfaceDeclaration(t.identifier(`${ucFirst(mutationName)}MutationResult`), null, null, resultInterfaceBody);
|
|
385
384
|
statements.push(t.exportNamedDeclaration(resultInterface));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@constructive-io/graphql-codegen",
|
|
3
|
-
"version": "2.28.
|
|
3
|
+
"version": "2.28.1",
|
|
4
4
|
"description": "CLI-based GraphQL SDK generator for PostGraphile endpoints with React Query hooks",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"graphql",
|
|
@@ -88,5 +88,5 @@
|
|
|
88
88
|
"tsx": "^4.21.0",
|
|
89
89
|
"typescript": "^5.9.3"
|
|
90
90
|
},
|
|
91
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "b10f4573bc0daa50502a1a5ea8ba610e00c3996b"
|
|
92
92
|
}
|