Skip to content

Commit

Permalink
fix(add-graphql): pass through isOneOf setting
Browse files Browse the repository at this point in the history
this ensures native GraphQLInputObjectTypes with isOneOf enabled are correctly added to the pothos schema
  • Loading branch information
acburdine committed Feb 26, 2025
1 parent f3feedc commit 4af88f1
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 4af88f1

Please sign in to comment.