From bab88db218ee0796e8858c2d2f0fff815e2e7584 Mon Sep 17 00:00:00 2001 From: Eddy Nguyen Date: Mon, 16 Dec 2024 21:22:07 +1100 Subject: [PATCH] Change to major because it may break existing use cases --- .changeset/thick-pianos-smoke.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.changeset/thick-pianos-smoke.md b/.changeset/thick-pianos-smoke.md index 53df81ad368..569664420a9 100644 --- a/.changeset/thick-pianos-smoke.md +++ b/.changeset/thick-pianos-smoke.md @@ -1,9 +1,11 @@ --- -'@graphql-codegen/visitor-plugin-common': patch -'@graphql-codegen/typescript-resolvers': patch -'@graphql-codegen/plugin-helpers': patch +'@graphql-codegen/visitor-plugin-common': major +'@graphql-codegen/typescript-resolvers': major +'@graphql-codegen/plugin-helpers': major --- Fix `mappers` usage with Federation -`mappers` was previously used as `__resolveReference`'s first param (usually called "reference"). However, this is incorrect because `reference` interface comes directly from `@key` and `@requires` directives. This patch fixes the issue by creating a new `FederationTypes` type and use it as the base for federation entity types when being used to type entity references +`mappers` was previously used as `__resolveReference`'s first param (usually called "reference"). However, this is incorrect because `reference` interface comes directly from `@key` and `@requires` directives. This patch fixes the issue by creating a new `FederationTypes` type and use it as the base for federation entity types when being used to type entity references. + +BREAKING CHANGES: No longer generate `UnwrappedObject` utility type, as this was used to support the wrong previously generated type.