diff --git a/graphql/codegen/src/__tests__/codegen/__snapshots__/client-generator.test.ts.snap b/graphql/codegen/src/__tests__/codegen/__snapshots__/client-generator.test.ts.snap index 2581ad40f..e9a299087 100644 --- a/graphql/codegen/src/__tests__/codegen/__snapshots__/client-generator.test.ts.snap +++ b/graphql/codegen/src/__tests__/codegen/__snapshots__/client-generator.test.ts.snap @@ -1,4 +1,4 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing exports[`client-generator generateCreateClientFile generates createClient factory with models 1`] = ` "/** diff --git a/graphql/codegen/src/__tests__/codegen/__snapshots__/input-types-generator.test.ts.snap b/graphql/codegen/src/__tests__/codegen/__snapshots__/input-types-generator.test.ts.snap index 9fa5733d5..523156dd3 100644 --- a/graphql/codegen/src/__tests__/codegen/__snapshots__/input-types-generator.test.ts.snap +++ b/graphql/codegen/src/__tests__/codegen/__snapshots__/input-types-generator.test.ts.snap @@ -1,4 +1,4 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing exports[`generateInputTypesFile generates complete types file for multiple tables with relations 1`] = ` "/** diff --git a/graphql/codegen/src/__tests__/codegen/__snapshots__/model-generator.test.ts.snap b/graphql/codegen/src/__tests__/codegen/__snapshots__/model-generator.test.ts.snap index db345a4e2..dc51d712f 100644 --- a/graphql/codegen/src/__tests__/codegen/__snapshots__/model-generator.test.ts.snap +++ b/graphql/codegen/src/__tests__/codegen/__snapshots__/model-generator.test.ts.snap @@ -1,4 +1,4 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing exports[`model-generator generates model with all CRUD methods 1`] = ` "/** diff --git a/graphql/codegen/src/__tests__/codegen/__snapshots__/query-keys-factory.test.ts.snap b/graphql/codegen/src/__tests__/codegen/__snapshots__/query-keys-factory.test.ts.snap index 9d6e45077..6bf8d8eb1 100644 --- a/graphql/codegen/src/__tests__/codegen/__snapshots__/query-keys-factory.test.ts.snap +++ b/graphql/codegen/src/__tests__/codegen/__snapshots__/query-keys-factory.test.ts.snap @@ -1,4 +1,4 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing exports[`generateInvalidationFile generates invalidation helpers for a single table without relationships 1`] = ` "/** diff --git a/graphql/codegen/src/__tests__/codegen/__snapshots__/react-query-hooks.test.ts.snap b/graphql/codegen/src/__tests__/codegen/__snapshots__/react-query-hooks.test.ts.snap index 1fa921534..efafdb00e 100644 --- a/graphql/codegen/src/__tests__/codegen/__snapshots__/react-query-hooks.test.ts.snap +++ b/graphql/codegen/src/__tests__/codegen/__snapshots__/react-query-hooks.test.ts.snap @@ -1,4 +1,4 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing exports[`Barrel File Generators generateCustomMutationsBarrel generates custom mutations barrel 1`] = ` "/** @@ -770,7 +770,6 @@ export const deleteUserMutationDocument = \` mutation DeleteUserMutation($input: DeleteUserInput!) { deleteUser(input: $input) { clientMutationId - deletedId } } \`; @@ -782,7 +781,6 @@ export interface DeleteUserMutationVariables { export interface DeleteUserMutationResult { deleteUser: { clientMutationId: string | null; - deletedId: string | null; }; } /** @@ -834,7 +832,6 @@ export const deletePostMutationDocument = \` mutation DeletePostMutation($input: DeletePostInput!) { deletePost(input: $input) { clientMutationId - deletedId } } \`; @@ -846,7 +843,6 @@ export interface DeletePostMutationVariables { export interface DeletePostMutationResult { deletePost: { clientMutationId: string | null; - deletedId: string | null; }; } /** @@ -895,7 +891,6 @@ export const deleteUserMutationDocument = \` mutation DeleteUserMutation($input: DeleteUserInput!) { deleteUser(input: $input) { clientMutationId - deletedId } } \`; @@ -907,7 +902,6 @@ export interface DeleteUserMutationVariables { export interface DeleteUserMutationResult { deleteUser: { clientMutationId: string | null; - deletedId: string | null; }; } /** diff --git a/graphql/codegen/src/__tests__/codegen/__snapshots__/schema-types-generator.test.ts.snap b/graphql/codegen/src/__tests__/codegen/__snapshots__/schema-types-generator.test.ts.snap index f3111ec74..e7d4d48d2 100644 --- a/graphql/codegen/src/__tests__/codegen/__snapshots__/schema-types-generator.test.ts.snap +++ b/graphql/codegen/src/__tests__/codegen/__snapshots__/schema-types-generator.test.ts.snap @@ -1,4 +1,4 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing exports[`schema-types-generator generates enum types as string unions 1`] = ` "/** diff --git a/graphql/codegen/src/cli/codegen/gql-ast.ts b/graphql/codegen/src/cli/codegen/gql-ast.ts index ec2c13aac..612db24a0 100644 --- a/graphql/codegen/src/cli/codegen/gql-ast.ts +++ b/graphql/codegen/src/cli/codegen/gql-ast.ts @@ -383,7 +383,6 @@ export function buildDeleteMutationAST(config: DeleteMutationConfig): DocumentNo selectionSet: t.selectionSet({ selections: [ t.field({ name: 'clientMutationId' }), - t.field({ name: 'deletedId' }), ], }), }), diff --git a/graphql/codegen/src/cli/codegen/mutations.ts b/graphql/codegen/src/cli/codegen/mutations.ts index 11596b3fe..0a3a75227 100644 --- a/graphql/codegen/src/cli/codegen/mutations.ts +++ b/graphql/codegen/src/cli/codegen/mutations.ts @@ -792,10 +792,6 @@ export function generateDeleteMutationHook( ); statements.push(t.exportNamedDeclaration(variablesInterface)); - const deletedPkProp = t.tsPropertySignature( - t.identifier(`deleted${ucFirst(pkField.name)}`), - t.tsTypeAnnotation(t.tsUnionType([pkTypeAnnotation, t.tsNullKeyword()])) - ); const clientMutationIdProp = t.tsPropertySignature( t.identifier('clientMutationId'), t.tsTypeAnnotation(t.tsUnionType([t.tsStringKeyword(), t.tsNullKeyword()])) @@ -804,7 +800,7 @@ export function generateDeleteMutationHook( const resultInterfaceBody = t.tsInterfaceBody([ t.tsPropertySignature( t.identifier(mutationName), - t.tsTypeAnnotation(t.tsTypeLiteral([clientMutationIdProp, deletedPkProp])) + t.tsTypeAnnotation(t.tsTypeLiteral([clientMutationIdProp])) ), ]); const resultInterface = t.tsInterfaceDeclaration(