Skip to content

Commit

Permalink
Merge pull request #1383 from acburdine/fix/graphql-one-of-input
Browse files Browse the repository at this point in the history
fix(add-graphql): pass through isOneOf setting from input objects
  • Loading branch information
hayes authored Feb 26, 2025
2 parents f3feedc + 4af88f1 commit 41540ea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/selfish-ladybugs-study.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@pothos/plugin-add-graphql": patch
---

correctly pass through isOneOf setting from native GraphQL input objects
1 change: 1 addition & 0 deletions packages/plugin-add-graphql/src/schema-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ proto.addGraphQLInput = function addGraphQLInput<Shape extends {}>(
...options,
description: type.description ?? undefined,
extensions: { ...type.extensions, ...extensions },
isOneOf: type.isOneOf,
fields: (t) => {
const existingFields = type.getFields();
const newFields: Record<string, InputFieldRef<SchemaTypes, unknown> | null> =
Expand Down

0 comments on commit 41540ea

Please sign in to comment.