Skip to content

Commit

Permalink
fix(delegate): do not use nullable prefixes if fields don't match
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan committed Apr 26, 2024
1 parent 3d5323d commit af7be09
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/light-mayflies-knock.md
@@ -0,0 +1,5 @@
---
"@graphql-tools/delegate": patch
---

Hotfix: do not use nullable and nonNullable prefixes if field names don't match
2 changes: 1 addition & 1 deletion packages/delegate/src/OverlappingAliasesTransform.ts
Expand Up @@ -48,7 +48,7 @@ export class OverlappingAliasesTransform<TContext>
seenNonNullable.add(fieldName);
currentNullable = false;
}
if (seenNullable.size && seenNonNullable.size) {
if (seenNullable.has(fieldName) && seenNonNullable.has(fieldName)) {
transformationContext[OverlappingAliases] = true;
return {
...subSelection,
Expand Down

0 comments on commit af7be09

Please sign in to comment.