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 4ced86c
Showing 1 changed file with 1 addition and 0 deletions.
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 4ced86c

Please sign in to comment.