agent_patch
runs/2026-02-28__13-38-10__gpt-5-3-codex/flux-pr-1308/flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/agent-logs/agent.patch
79246 bytes
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/asttransform/baseschema.go b/app/v2/pkg/asttransform/baseschema.go
index 45a6ebc..51642e9 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/asttransform/baseschema.go
+++ b/app/v2/pkg/asttransform/baseschema.go
@@ -168,6 +168,8 @@ directive @deprecated(
directive @specifiedBy(url: String!) on SCALAR
+directive @oneOf on INPUT_OBJECT
+
"""
A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.
In some cases, you need to provide options to alter GraphQL's execution behavior
@@ -312,6 +314,8 @@ type __Type {
ofType: __Type
# may be non-null for custom SCALAR, otherwise null.
specifiedByURL: String
+ # if true, this is a OneOf Input Object.
+ isOneOf: Boolean
}
"An enum describing what kind of type a given '__Type' is."
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/asttransform/fixtures/complete.golden b/app/v2/pkg/asttransform/fixtures/complete.golden
index 27488b6..c73c1e5 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/asttransform/fixtures/complete.golden
+++ b/app/v2/pkg/asttransform/fixtures/complete.golden
@@ -57,6 +57,8 @@ directive @specifiedBy(
url: String!
) on SCALAR
+directive @oneOf on INPUT_OBJECT
+
"""
A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.
In some cases, you need to provide options to alter GraphQL's execution behavior
@@ -201,6 +203,7 @@ type __Type {
inputFields(includeDeprecated: Boolean = false): [__InputValue!]
ofType: __Type
specifiedByURL: String
+ isOneOf: Boolean
__typename: String!
}
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/asttransform/fixtures/custom_query_name.golden b/app/v2/pkg/asttransform/fixtures/custom_query_name.golden
index 3bcc2af..c336cde 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/asttransform/fixtures/custom_query_name.golden
+++ b/app/v2/pkg/asttransform/fixtures/custom_query_name.golden
@@ -57,6 +57,8 @@ directive @specifiedBy(
url: String!
) on SCALAR
+directive @oneOf on INPUT_OBJECT
+
"""
A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.
In some cases, you need to provide options to alter GraphQL's execution behavior
@@ -201,6 +203,7 @@ type __Type {
inputFields(includeDeprecated: Boolean = false): [__InputValue!]
ofType: __Type
specifiedByURL: String
+ isOneOf: Boolean
__typename: String!
}
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/asttransform/fixtures/mutation_only.golden b/app/v2/pkg/asttransform/fixtures/mutation_only.golden
index 66da6be..481c87c 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/asttransform/fixtures/mutation_only.golden
+++ b/app/v2/pkg/asttransform/fixtures/mutation_only.golden
@@ -49,6 +49,8 @@ directive @specifiedBy(
url: String!
) on SCALAR
+directive @oneOf on INPUT_OBJECT
+
"""
A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.
In some cases, you need to provide options to alter GraphQL's execution behavior
@@ -193,6 +195,7 @@ type __Type {
inputFields(includeDeprecated: Boolean = false): [__InputValue!]
ofType: __Type
specifiedByURL: String
+ isOneOf: Boolean
__typename: String!
}
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/asttransform/fixtures/schema_missing.golden b/app/v2/pkg/asttransform/fixtures/schema_missing.golden
index 27488b6..c73c1e5 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/asttransform/fixtures/schema_missing.golden
+++ b/app/v2/pkg/asttransform/fixtures/schema_missing.golden
@@ -57,6 +57,8 @@ directive @specifiedBy(
url: String!
) on SCALAR
+directive @oneOf on INPUT_OBJECT
+
"""
A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.
In some cases, you need to provide options to alter GraphQL's execution behavior
@@ -201,6 +203,7 @@ type __Type {
inputFields(includeDeprecated: Boolean = false): [__InputValue!]
ofType: __Type
specifiedByURL: String
+ isOneOf: Boolean
__typename: String!
}
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/asttransform/fixtures/simple.golden b/app/v2/pkg/asttransform/fixtures/simple.golden
index 27488b6..c73c1e5 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/asttransform/fixtures/simple.golden
+++ b/app/v2/pkg/asttransform/fixtures/simple.golden
@@ -57,6 +57,8 @@ directive @specifiedBy(
url: String!
) on SCALAR
+directive @oneOf on INPUT_OBJECT
+
"""
A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.
In some cases, you need to provide options to alter GraphQL's execution behavior
@@ -201,6 +203,7 @@ type __Type {
inputFields(includeDeprecated: Boolean = false): [__InputValue!]
ofType: __Type
specifiedByURL: String
+ isOneOf: Boolean
__typename: String!
}
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/asttransform/fixtures/subscription_only.golden b/app/v2/pkg/asttransform/fixtures/subscription_only.golden
index e8e8573..060fc4a 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/asttransform/fixtures/subscription_only.golden
+++ b/app/v2/pkg/asttransform/fixtures/subscription_only.golden
@@ -48,6 +48,8 @@ directive @specifiedBy(
url: String!
) on SCALAR
+directive @oneOf on INPUT_OBJECT
+
"""
A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.
In some cases, you need to provide options to alter GraphQL's execution behavior
@@ -192,6 +194,7 @@ type __Type {
inputFields(includeDeprecated: Boolean = false): [__InputValue!]
ofType: __Type
specifiedByURL: String
+ isOneOf: Boolean
__typename: String!
}
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/asttransform/fixtures/subscription_renamed.golden b/app/v2/pkg/asttransform/fixtures/subscription_renamed.golden
index e78cb9d..b503108 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/asttransform/fixtures/subscription_renamed.golden
+++ b/app/v2/pkg/asttransform/fixtures/subscription_renamed.golden
@@ -48,6 +48,8 @@ directive @specifiedBy(
url: String!
) on SCALAR
+directive @oneOf on INPUT_OBJECT
+
"""
A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.
In some cases, you need to provide options to alter GraphQL's execution behavior
@@ -192,6 +194,7 @@ type __Type {
inputFields(includeDeprecated: Boolean = false): [__InputValue!]
ofType: __Type
specifiedByURL: String
+ isOneOf: Boolean
__typename: String!
}
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/asttransform/fixtures/with_mutation_subscription.golden b/app/v2/pkg/asttransform/fixtures/with_mutation_subscription.golden
index 229b242..8c0ae03 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/asttransform/fixtures/with_mutation_subscription.golden
+++ b/app/v2/pkg/asttransform/fixtures/with_mutation_subscription.golden
@@ -68,6 +68,8 @@ directive @specifiedBy(
url: String!
) on SCALAR
+directive @oneOf on INPUT_OBJECT
+
"""
A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.
In some cases, you need to provide options to alter GraphQL's execution behavior
@@ -212,6 +214,7 @@ type __Type {
inputFields(includeDeprecated: Boolean = false): [__InputValue!]
ofType: __Type
specifiedByURL: String
+ isOneOf: Boolean
__typename: String!
}
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/astvalidation/operation_rule_all_variable_uses_defined.go b/app/v2/pkg/astvalidation/operation_rule_all_variable_uses_defined.go
index bc9d098..b868ff9 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/astvalidation/operation_rule_all_variable_uses_defined.go
+++ b/app/v2/pkg/astvalidation/operation_rule_all_variable_uses_defined.go
@@ -53,5 +53,5 @@ func (a *allVariableUsesDefinedVisitor) EnterArgument(ref int) {
// at this point we're safe to say this variable was not defined on the root operation of this argument
argumentName := a.operation.ArgumentNameBytes(ref)
- a.StopWithExternalErr(operationreport.ErrVariableNotDefinedOnArgument(variableName, argumentName))
+ a.StopWithExternalErr(operationreport.ErrVariableNotDefinedOnArgument(variableName, argumentName, a.operation.Arguments[ref].Value.Position))
}
diff --git a/app/v2/pkg/astvalidation/operation_rule_oneof_test.go b/app/v2/pkg/astvalidation/operation_rule_oneof_test.go
new file mode 100644
index 0000000..0448237
--- /dev/null
+++ b/app/v2/pkg/astvalidation/operation_rule_oneof_test.go
@@ -0,0 +1,92 @@
+package astvalidation
+
+import (
+ "testing"
+
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
+
+ "github.com/wundergraph/graphql-go-tools/v2/pkg/astparser"
+ "github.com/wundergraph/graphql-go-tools/v2/pkg/asttransform"
+ "github.com/wundergraph/graphql-go-tools/v2/pkg/operationreport"
+)
+
+func TestValues_OneOfInputObjects(t *testing.T) {
+ definition, report := astparser.ParseGraphqlDocumentString(`
+ directive @oneOf on INPUT_OBJECT
+ input UserBy @oneOf {
+ id: ID
+ username: String
+ }
+ type Query {
+ user(by: UserBy!): String
+ }
+ `)
+ require.False(t, report.HasErrors(), report.Error())
+ require.NoError(t, asttransform.MergeDefinitionWithBaseSchema(&definition))
+
+ validate := func(t *testing.T, operationInput string) operationreport.Report {
+ t.Helper()
+ operation, operationReport := astparser.ParseGraphqlDocumentString(operationInput)
+ require.False(t, operationReport.HasErrors(), operationReport.Error())
+
+ validator := NewOperationValidator([]Rule{Values()})
+ validator.Validate(&operation, &definition, &operationReport)
+ return operationReport
+ }
+
+ t.Run("invalid when more than one field is provided", func(t *testing.T) {
+ operationReport := validate(t, `query { user(by: { id: "1", username: "Ada" }) }`)
+ require.True(t, operationReport.HasErrors())
+ require.Len(t, operationReport.ExternalErrors, 1)
+ assert.Equal(t, `OneOf Input Object "UserBy" must specify exactly one key.`, operationReport.ExternalErrors[0].Message)
+ })
+
+ t.Run("invalid when provided field is null", func(t *testing.T) {
+ operationReport := validate(t, `query { user(by: { id: null }) }`)
+ require.True(t, operationReport.HasErrors())
+ require.Len(t, operationReport.ExternalErrors, 1)
+ assert.Equal(t, `Field "UserBy.id" must be non-null.`, operationReport.ExternalErrors[0].Message)
+ })
+
+ t.Run("valid when exactly one non-null field is provided", func(t *testing.T) {
+ operationReport := validate(t, `query { user(by: { id: "1" }) }`)
+ require.False(t, operationReport.HasErrors(), operationReport.Error())
+ })
+}
+
+func TestUndefinedVariableErrors_ContainLocations(t *testing.T) {
+ definition, report := astparser.ParseGraphqlDocumentString(`type Query { hello(arg: String): String }`)
+ require.False(t, report.HasErrors(), report.Error())
+ require.NoError(t, asttransform.MergeDefinitionWithBaseSchema(&definition))
+
+ operation, report := astparser.ParseGraphqlDocumentString(`query { hello(arg: $v) }`)
+ require.False(t, report.HasErrors(), report.Error())
+
+ validator := NewOperationValidator([]Rule{AllVariableUsesDefined()})
+ validator.Validate(&operation, &definition, &report)
+
+ require.True(t, report.HasErrors())
+ require.Len(t, report.ExternalErrors, 1)
+ require.Len(t, report.ExternalErrors[0].Locations, 1)
+ assert.NotZero(t, report.ExternalErrors[0].Locations[0].Line)
+ assert.NotZero(t, report.ExternalErrors[0].Locations[0].Column)
+}
+
+func TestValuesRule_UndefinedVariableError_ContainsLocation(t *testing.T) {
+ definition, report := astparser.ParseGraphqlDocumentString(`type Query { hello(arg: String): String }`)
+ require.False(t, report.HasErrors(), report.Error())
+ require.NoError(t, asttransform.MergeDefinitionWithBaseSchema(&definition))
+
+ operation, report := astparser.ParseGraphqlDocumentString(`query { hello(arg: $v) }`)
+ require.False(t, report.HasErrors(), report.Error())
+
+ validator := NewOperationValidator([]Rule{Values()})
+ validator.Validate(&operation, &definition, &report)
+
+ require.True(t, report.HasErrors())
+ require.Len(t, report.ExternalErrors, 1)
+ require.Len(t, report.ExternalErrors[0].Locations, 1)
+ assert.NotZero(t, report.ExternalErrors[0].Locations[0].Line)
+ assert.NotZero(t, report.ExternalErrors[0].Locations[0].Column)
+}
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/astvalidation/operation_rule_values.go b/app/v2/pkg/astvalidation/operation_rule_values.go
index 5030117..fad16fa 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/astvalidation/operation_rule_values.go
+++ b/app/v2/pkg/astvalidation/operation_rule_values.go
@@ -11,6 +11,8 @@ import (
"github.com/wundergraph/graphql-go-tools/v2/pkg/operationreport"
)
+var oneOfDirectiveName = []byte("oneOf")
+
// Values validates if values are used properly
func Values() Rule {
return func(walker *astvisitor.Walker) {
@@ -54,7 +56,7 @@ func (v *valuesVisitor) EnterArgument(ref int) {
if value.Kind == ast.ValueKindVariable {
_, exists := v.variableDefinition(value.Ref)
if !exists {
- v.StopWithExternalErr(operationreport.ErrVariableNotDefinedOnOperation(v.operation.VariableValueNameBytes(value.Ref), []byte("")))
+ v.StopWithExternalErr(operationreport.ErrVariableNotDefinedOnOperation(v.operation.VariableValueNameBytes(value.Ref), []byte(""), value.Position))
return
}
@@ -430,6 +432,46 @@ func (v *valuesVisitor) valueSatisfiesInputObjectTypeDefinition(value ast.Value,
return false
}
+ if v.inputObjectTypeDefinitionIsOneOf(inputObjectTypeDefinition) {
+ return v.objectValueSatisfiesOneOfConstraint(value, inputObjectTypeDefinition)
+ }
+
+ return true
+}
+
+func (v *valuesVisitor) inputObjectTypeDefinitionIsOneOf(inputObjectTypeDefinition int) bool {
+ inputObjectDefinition := v.definition.InputObjectTypeDefinitions[inputObjectTypeDefinition]
+ if !inputObjectDefinition.HasDirectives {
+ return false
+ }
+
+ for _, directiveRef := range inputObjectDefinition.Directives.Refs {
+ if bytes.Equal(v.definition.DirectiveNameBytes(directiveRef), oneOfDirectiveName) {
+ return true
+ }
+ }
+
+ return false
+}
+
+func (v *valuesVisitor) objectValueSatisfiesOneOfConstraint(value ast.Value, inputObjectTypeDefinition int) bool {
+ inputObjectName := v.definition.InputObjectTypeDefinitionNameBytes(inputObjectTypeDefinition)
+ nonNullFieldCount := 0
+
+ for _, objectFieldRef := range v.operation.ObjectValues[value.Ref].Refs {
+ objectField := v.operation.ObjectField(objectFieldRef)
+ if objectField.Value.Kind == ast.ValueKindNull {
+ v.Report.AddExternalError(operationreport.ErrOneOfInputFieldMustBeNonNull(inputObjectName, v.operation.ObjectFieldNameBytes(objectFieldRef), objectField.Position))
+ return false
+ }
+ nonNullFieldCount++
+ }
+
+ if nonNullFieldCount != 1 {
+ v.Report.AddExternalError(operationreport.ErrOneOfInputObjectMustSpecifyExactlyOneField(inputObjectName, value.Position))
+ return false
+ }
+
return true
}
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/engine/datasource/introspection_datasource/config_factory.go b/app/v2/pkg/engine/datasource/introspection_datasource/config_factory.go
index 0952d3f..a9532af 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/engine/datasource/introspection_datasource/config_factory.go
+++ b/app/v2/pkg/engine/datasource/introspection_datasource/config_factory.go
@@ -71,7 +71,7 @@ func (f *IntrospectionConfigFactory) buildRootDataSourceConfiguration() (plan.Da
},
{
TypeName: "__Type",
- FieldNames: []string{"kind", "name", "description", "fields", "interfaces", "possibleTypes", "enumValues", "inputFields", "ofType", "specifiedByURL", "__typename"},
+ FieldNames: []string{"kind", "name", "description", "fields", "interfaces", "possibleTypes", "enumValues", "inputFields", "ofType", "specifiedByURL", "isOneOf", "__typename"},
},
{
TypeName: "__Field",
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/engine/datasource/introspection_datasource/fixtures/schema_introspection.golden b/app/v2/pkg/engine/datasource/introspection_datasource/fixtures/schema_introspection.golden
index 0064f2d..f2522d1 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/engine/datasource/introspection_datasource/fixtures/schema_introspection.golden
+++ b/app/v2/pkg/engine/datasource/introspection_datasource/fixtures/schema_introspection.golden
@@ -56,7 +56,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
"mutationType": null,
"subscriptionType": null,
@@ -118,7 +119,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "ENUM",
@@ -150,7 +152,8 @@
}
],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -180,7 +183,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -189,7 +193,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -198,7 +203,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -207,7 +213,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -216,7 +223,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -225,7 +233,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
}
],
"directives": [
@@ -350,6 +359,16 @@
],
"isRepeatable": false,
"__typename": "__Directive"
+ },
+ {
+ "name": "oneOf",
+ "description": "",
+ "locations": [
+ "INPUT_OBJECT"
+ ],
+ "args": [],
+ "isRepeatable": false,
+ "__typename": "__Directive"
}
],
"__typename": "__Schema"
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/engine/datasource/introspection_datasource/fixtures/schema_introspection_with_custom_root_operation_types.golden b/app/v2/pkg/engine/datasource/introspection_datasource/fixtures/schema_introspection_with_custom_root_operation_types.golden
index 0e8d299..9fbba6a 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/engine/datasource/introspection_datasource/fixtures/schema_introspection_with_custom_root_operation_types.golden
+++ b/app/v2/pkg/engine/datasource/introspection_datasource/fixtures/schema_introspection_with_custom_root_operation_types.golden
@@ -56,7 +56,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
"mutationType": {
"kind": "OBJECT",
@@ -106,7 +107,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
"subscriptionType": {
"kind": "OBJECT",
@@ -131,7 +133,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
"types": [
{
@@ -191,7 +194,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -241,7 +245,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -266,7 +271,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "ENUM",
@@ -298,7 +304,8 @@
}
],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -328,7 +335,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -337,7 +345,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -346,7 +355,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -355,7 +365,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -364,7 +375,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -373,7 +385,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
}
],
"directives": [
@@ -498,6 +511,16 @@
],
"isRepeatable": false,
"__typename": "__Directive"
+ },
+ {
+ "name": "oneOf",
+ "description": "",
+ "locations": [
+ "INPUT_OBJECT"
+ ],
+ "args": [],
+ "isRepeatable": false,
+ "__typename": "__Directive"
}
],
"__typename": "__Schema"
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/engine/datasource/introspection_datasource/fixtures/type_introspection.golden b/app/v2/pkg/engine/datasource/introspection_datasource/fixtures/type_introspection.golden
index 41827c0..157c28b 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/engine/datasource/introspection_datasource/fixtures/type_introspection.golden
+++ b/app/v2/pkg/engine/datasource/introspection_datasource/fixtures/type_introspection.golden
@@ -55,5 +55,6 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
}
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/federation/fixtures/federated_schema.golden b/app/v2/pkg/federation/fixtures/federated_schema.golden
index 5a3119c..2f6a8e9 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/federation/fixtures/federated_schema.golden
+++ b/app/v2/pkg/federation/fixtures/federated_schema.golden
@@ -97,6 +97,8 @@ directive @specifiedBy(
url: String!
) on SCALAR
+directive @oneOf on INPUT_OBJECT
+
"""
A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.
In some cases, you need to provide options to alter GraphQL's execution behavior
@@ -241,6 +243,7 @@ type __Type {
inputFields(includeDeprecated: Boolean = false): [__InputValue!]
ofType: __Type
specifiedByURL: String
+ isOneOf: Boolean
__typename: String!
}
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/introspection/converter.go b/app/v2/pkg/introspection/converter.go
index 22a37ea..56a58ce 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/introspection/converter.go
+++ b/app/v2/pkg/introspection/converter.go
@@ -126,10 +126,17 @@ func (j *JsonConverter) importInputObject(fullType *FullType) error {
return err
}
- j.doc.ImportInputObjectTypeDefinition(
+ var directiveRefs []int
+ if fullType.IsOneOf {
+ directiveRefs = append(directiveRefs, j.doc.ImportDirective(OneOfDirectiveName, nil))
+ }
+
+ j.doc.ImportInputObjectTypeDefinitionWithDirectives(
fullType.Name,
fullType.Description,
- argRefs)
+ argRefs,
+ directiveRefs,
+ )
return nil
}
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/introspection/fixtures/interfaces_implementing_interfaces.golden b/app/v2/pkg/introspection/fixtures/interfaces_implementing_interfaces.golden
index 2bc1782..452fcf5 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/introspection/fixtures/interfaces_implementing_interfaces.golden
+++ b/app/v2/pkg/introspection/fixtures/interfaces_implementing_interfaces.golden
@@ -7,7 +7,8 @@
"inputFields": null,
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
"mutationType": null,
"subscriptionType": null,
@@ -40,7 +41,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "INTERFACE",
@@ -96,7 +98,8 @@
}
],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "INTERFACE",
@@ -177,7 +180,8 @@
}
],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "INTERFACE",
@@ -207,7 +211,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "INTERFACE",
@@ -263,7 +268,8 @@
}
],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "INTERFACE",
@@ -344,7 +350,8 @@
}
],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
}
],
"directives": [],
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/introspection/fixtures/starwars_introspected.golden b/app/v2/pkg/introspection/fixtures/starwars_introspected.golden
index 5bb9e05..6867d99 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/introspection/fixtures/starwars_introspected.golden
+++ b/app/v2/pkg/introspection/fixtures/starwars_introspected.golden
@@ -247,7 +247,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
"mutationType": {
"kind": "OBJECT",
@@ -306,7 +307,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
"subscriptionType": {
"kind": "OBJECT",
@@ -346,7 +348,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
"types": [
{
@@ -596,7 +599,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -655,7 +659,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -695,7 +700,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "ENUM",
@@ -727,7 +733,8 @@
}
],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "INTERFACE",
@@ -880,7 +887,8 @@
"__typename": "__Type"
}
],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "ENUM",
@@ -905,7 +913,8 @@
}
],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -1128,7 +1137,8 @@
}
],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -1289,7 +1299,8 @@
}
],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -1371,7 +1382,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -1415,7 +1427,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -1473,7 +1486,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -1531,7 +1545,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -1588,7 +1603,8 @@
],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -1655,7 +1671,8 @@
],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -1747,7 +1764,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "UNION",
@@ -1775,7 +1793,8 @@
"__typename": "__Type"
}
],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -1785,7 +1804,8 @@
"interfaces": [],
"possibleTypes": [],
"__typename": "__Type",
- "specifiedByURL": "https://scalars.graphql.org/andimarek/date-time"
+ "specifiedByURL": "https://scalars.graphql.org/andimarek/date-time",
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -1794,7 +1814,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -1803,7 +1824,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -1812,7 +1834,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -1821,7 +1844,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -1830,7 +1854,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
}
],
"directives": [
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/introspection/generator.go b/app/v2/pkg/introspection/generator.go
index 820483f..2370843 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/introspection/generator.go
+++ b/app/v2/pkg/introspection/generator.go
@@ -13,6 +13,7 @@ const (
DeprecatedDirectiveName = "deprecated"
DeprecationReasonArgName = "reason"
SpecifiedByDirectiveName = "specifiedBy"
+ OneOfDirectiveName = "oneOf"
)
type Generator struct {
@@ -315,6 +316,9 @@ func (i *introspectionVisitor) EnterInputObjectTypeDefinition(ref int) {
i.currentType.Kind = INPUTOBJECT
i.currentType.Name = i.definition.InputObjectTypeDefinitionNameString(ref)
i.currentType.Description = i.definition.InputObjectTypeDefinitionDescriptionString(ref)
+ if i.definition.NodeHasDirectiveByNameString(ast.Node{Kind: ast.NodeKindInputObjectTypeDefinition, Ref: ref}, OneOfDirectiveName) {
+ i.currentType.IsOneOf = true
+ }
}
func (i *introspectionVisitor) LeaveInputObjectTypeDefinition(ref int) {
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/introspection/introspection.go b/app/v2/pkg/introspection/introspection.go
index c799e64..3895126 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/introspection/introspection.go
+++ b/app/v2/pkg/introspection/introspection.go
@@ -70,6 +70,8 @@ type FullType struct {
TypeName string `json:"__typename"`
// may be non-null for custom SCALAR, otherwise null.
SpecifiedByURL *string `json:"specifiedByURL,omitempty"`
+ // true when this is a OneOf input object, false otherwise.
+ IsOneOf bool `json:"isOneOf"`
}
func NewFullType() *FullType {
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/introspection/testdata/out_swapi_introspection_response.json b/app/v2/pkg/introspection/testdata/out_swapi_introspection_response.json
index 4b470ba..6fbab12 100755
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/introspection/testdata/out_swapi_introspection_response.json
+++ b/app/v2/pkg/introspection/testdata/out_swapi_introspection_response.json
@@ -7,7 +7,8 @@
"inputFields": null,
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
"mutationType": {
"kind": "SCALAR",
@@ -16,7 +17,8 @@
"inputFields": null,
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
"subscriptionType": {
"kind": "SCALAR",
@@ -25,7 +27,8 @@
"inputFields": null,
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
"types": [
{
@@ -65,7 +68,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -104,7 +108,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -143,7 +148,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -182,7 +188,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -221,7 +228,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -260,7 +268,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -299,7 +308,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -338,7 +348,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -377,7 +388,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -563,7 +575,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -721,7 +734,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -2471,7 +2485,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -2553,7 +2568,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -2681,7 +2697,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -3049,7 +3066,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -3440,7 +3458,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -3711,7 +3730,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -3992,7 +4012,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -4295,7 +4316,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -4584,7 +4606,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -4775,7 +4798,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -4933,7 +4957,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -6573,7 +6598,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -6655,7 +6681,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -7046,7 +7073,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -7317,7 +7345,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -7598,7 +7627,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -7901,7 +7931,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -8190,7 +8221,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -8252,7 +8284,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -8296,7 +8329,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -14114,7 +14148,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -14348,7 +14383,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -14506,7 +14542,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -15978,7 +16015,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -16060,7 +16098,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -16428,7 +16467,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -16699,7 +16739,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -16980,7 +17021,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -17283,7 +17325,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -17572,7 +17615,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -17810,7 +17854,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -17968,7 +18013,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -19662,7 +19708,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -19744,7 +19791,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -20112,7 +20160,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -20475,7 +20524,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -20514,7 +20564,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -20553,7 +20604,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -20592,7 +20644,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -20631,7 +20684,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -20670,7 +20724,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -20709,7 +20764,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -20748,7 +20804,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -20787,7 +20844,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -20826,7 +20884,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -21074,7 +21133,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -21232,7 +21292,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -22962,7 +23023,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -23044,7 +23106,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -23412,7 +23475,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -23803,7 +23867,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -24073,7 +24138,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -24231,7 +24297,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -26537,7 +26604,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -26619,7 +26687,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -26987,7 +27056,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -27378,7 +27448,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -27592,7 +27663,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -27719,7 +27791,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -28096,7 +28169,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -28501,7 +28575,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -28786,7 +28861,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -29081,7 +29157,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -29398,7 +29475,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -29701,7 +29779,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -29957,7 +30036,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -30115,7 +30195,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -32373,7 +32454,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -32455,7 +32537,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -32823,7 +32906,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -33214,7 +33298,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "ENUM",
@@ -33246,7 +33331,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -33439,7 +33525,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -35237,7 +35324,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "ENUM",
@@ -35388,7 +35476,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -35397,7 +35486,8 @@
"inputFields": null,
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -36800,7 +36890,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -38488,7 +38579,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "ENUM",
@@ -38625,7 +38717,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INTERFACE",
@@ -38698,7 +38791,8 @@
"__typename": ""
}
],
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "ENUM",
@@ -38807,7 +38901,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "ENUM",
@@ -38846,7 +38941,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "ENUM",
@@ -38906,7 +39002,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "ENUM",
@@ -39057,7 +39154,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -40291,7 +40389,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -41811,7 +41910,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "ENUM",
@@ -41948,7 +42048,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -42675,7 +42776,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -44417,7 +44519,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "ENUM",
@@ -44582,7 +44685,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -46636,7 +46740,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "ENUM",
@@ -46759,7 +46864,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "ENUM",
@@ -46812,7 +46918,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "ENUM",
@@ -46970,7 +47077,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -47707,7 +47815,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -49485,7 +49594,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "ENUM",
@@ -49636,7 +49746,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -50395,7 +50506,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -52749,7 +52861,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "ENUM",
@@ -52970,7 +53083,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -53715,7 +53829,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -56021,7 +56136,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "ENUM",
@@ -56228,7 +56344,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -56258,7 +56375,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -56417,7 +56535,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "ENUM",
@@ -56554,7 +56673,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -56631,7 +56751,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -56756,7 +56877,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -56833,7 +56955,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -56949,7 +57072,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -57171,7 +57295,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "ENUM",
@@ -57238,7 +57363,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -57247,7 +57373,8 @@
"inputFields": null,
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -57256,7 +57383,8 @@
"inputFields": null,
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -57265,7 +57393,8 @@
"inputFields": null,
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -57274,7 +57403,8 @@
"inputFields": null,
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -57283,7 +57413,8 @@
"inputFields": null,
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
}
],
"directives": [
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/operationreport/externalerror.go b/app/v2/pkg/operationreport/externalerror.go
index 8de9805..b8b5ad0 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/operationreport/externalerror.go
+++ b/app/v2/pkg/operationreport/externalerror.go
@@ -8,24 +8,26 @@ import (
)
const (
- NotCompatibleTypeErrMsg = "%s cannot represent value: %s"
- NotStringErrMsg = "%s cannot represent a non string value: %s"
- NotIntegerErrMsg = "%s cannot represent non-integer value: %s"
- BigIntegerErrMsg = "%s cannot represent non 32-bit signed integer value: %s"
- NotFloatErrMsg = "%s cannot represent non numeric value: %s"
- NotBooleanErrMsg = "%s cannot represent a non boolean value: %s"
- NotIDErrMsg = "%s cannot represent a non-string and non-integer value: %s"
- NotEnumErrMsg = `Enum "%s" cannot represent non-enum value: %s.`
- NotAnEnumMemberErrMsg = `Value "%s" does not exist in "%s" enum.`
- NullValueErrMsg = `Expected value of type "%s", found null.`
- UnknownArgumentOnDirectiveErrMsg = `Unknown argument "%s" on directive "@%s".`
- UnknownArgumentOnFieldErrMsg = `Unknown argument "%s" on field "%s.%s".`
- UnknownTypeErrMsg = `Unknown type "%s".`
- VariableIsNotInputTypeErrMsg = `Variable "$%s" cannot be non-input type "%s".`
- MissingRequiredFieldOfInputObjectErrMsg = `Field "%s.%s" of required type "%s" was not provided.`
- UnknownFieldOfInputObjectErrMsg = `Field "%s" is not defined by type "%s".`
- DuplicatedFieldInputObjectErrMsg = `There can be only one input field named "%s".`
- ValueIsNotAnInputObjectTypeErrMsg = `Expected value of type "%s", found %s.`
+ NotCompatibleTypeErrMsg = "%s cannot represent value: %s"
+ NotStringErrMsg = "%s cannot represent a non string value: %s"
+ NotIntegerErrMsg = "%s cannot represent non-integer value: %s"
+ BigIntegerErrMsg = "%s cannot represent non 32-bit signed integer value: %s"
+ NotFloatErrMsg = "%s cannot represent non numeric value: %s"
+ NotBooleanErrMsg = "%s cannot represent a non boolean value: %s"
+ NotIDErrMsg = "%s cannot represent a non-string and non-integer value: %s"
+ NotEnumErrMsg = `Enum "%s" cannot represent non-enum value: %s.`
+ NotAnEnumMemberErrMsg = `Value "%s" does not exist in "%s" enum.`
+ NullValueErrMsg = `Expected value of type "%s", found null.`
+ UnknownArgumentOnDirectiveErrMsg = `Unknown argument "%s" on directive "@%s".`
+ UnknownArgumentOnFieldErrMsg = `Unknown argument "%s" on field "%s.%s".`
+ UnknownTypeErrMsg = `Unknown type "%s".`
+ VariableIsNotInputTypeErrMsg = `Variable "$%s" cannot be non-input type "%s".`
+ MissingRequiredFieldOfInputObjectErrMsg = `Field "%s.%s" of required type "%s" was not provided.`
+ UnknownFieldOfInputObjectErrMsg = `Field "%s" is not defined by type "%s".`
+ DuplicatedFieldInputObjectErrMsg = `There can be only one input field named "%s".`
+ ValueIsNotAnInputObjectTypeErrMsg = `Expected value of type "%s", found %s.`
+ OneOfInputObjectMustSpecifyExactlyOneErrMsg = `OneOf Input Object "%s" must specify exactly one key.`
+ OneOfInputFieldMustBeNonNullErrMsg = `Field "%s.%s" must be non-null.`
)
type ExternalError struct {
@@ -257,6 +259,18 @@ func ErrValueIsNotAnInputObjectType(value, inputType ast.ByteSlice, position pos
return err
}
+func ErrOneOfInputObjectMustSpecifyExactlyOneField(inputObjectName ast.ByteSlice, position position.Position) (err ExternalError) {
+ err.Message = fmt.Sprintf(OneOfInputObjectMustSpecifyExactlyOneErrMsg, inputObjectName)
+ err.Locations = LocationsFromPosition(position)
+ return err
+}
+
+func ErrOneOfInputFieldMustBeNonNull(inputObjectName, fieldName ast.ByteSlice, position position.Position) (err ExternalError) {
+ err.Message = fmt.Sprintf(OneOfInputFieldMustBeNonNullErrMsg, inputObjectName, fieldName)
+ err.Locations = LocationsFromPosition(position)
+ return err
+}
+
func ErrValueDoesntSatisfyString(value, inputType ast.ByteSlice, position position.Position) (err ExternalError) {
err.Message = fmt.Sprintf(NotStringErrMsg, inputType, value)
err.Locations = LocationsFromPosition(position)
@@ -305,8 +319,9 @@ func ErrVariableTypeDoesntSatisfyInputValueDefinition(value, inputType, expected
return err
}
-func ErrVariableNotDefinedOnOperation(variableName, operationName ast.ByteSlice) (err ExternalError) {
+func ErrVariableNotDefinedOnOperation(variableName, operationName ast.ByteSlice, position position.Position) (err ExternalError) {
err.Message = fmt.Sprintf("variable: %s not defined on operation: %s", variableName, operationName)
+ err.Locations = LocationsFromPosition(position)
return err
}
@@ -320,8 +335,9 @@ func ErrVariableMustBeUnique(variableName, operationName ast.ByteSlice) (err Ext
return err
}
-func ErrVariableNotDefinedOnArgument(variableName, argumentName ast.ByteSlice) (err ExternalError) {
+func ErrVariableNotDefinedOnArgument(variableName, argumentName ast.ByteSlice, position position.Position) (err ExternalError) {
err.Message = fmt.Sprintf("variable: %s not defined on argument: %s", variableName, argumentName)
+ err.Locations = LocationsFromPosition(position)
return err
}
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/variablesvalidation/variablesvalidation.go b/app/v2/pkg/variablesvalidation/variablesvalidation.go
index 70bb603..ea1e9e9 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/variablesvalidation/variablesvalidation.go
+++ b/app/v2/pkg/variablesvalidation/variablesvalidation.go
@@ -15,6 +15,8 @@ import (
"github.com/wundergraph/graphql-go-tools/v2/pkg/operationreport"
)
+var oneOfDirectiveNameBytes = []byte("oneOf")
+
type InvalidVariableError struct {
ExtensionCode string
Message string
@@ -325,6 +327,41 @@ func (v *variablesVisitor) renderVariableInvalidNullError(variableName []byte, t
v.err = v.newInvalidVariableError(fmt.Sprintf(`Variable "$%s" got invalid value null; Expected non-nullable type "%s" not to be null.`, string(variableName), typeName))
}
+func (v *variablesVisitor) renderVariableOneOfInputMustSpecifyExactlyOneFieldError(typeName []byte) {
+ variableName := string(v.currentVariableName)
+ invalidValue := string(v.currentVariableValue.MarshalTo(nil))
+ var path string
+ if len(v.path) > 1 {
+ path = fmt.Sprintf(` at "%s"`, v.renderPath())
+ }
+ v.err = v.newInvalidVariableError(fmt.Sprintf(`%s%s; OneOf Input Object "%s" must specify exactly one key.`, v.invalidValueMessage(variableName, invalidValue), path, string(typeName)))
+}
+
+func (v *variablesVisitor) renderVariableOneOfFieldMustBeNonNullError(typeName []byte, fieldName []byte) {
+ variableName := string(v.currentVariableName)
+ invalidValue := string(v.currentVariableValue.MarshalTo(nil))
+ var path string
+ if len(v.path) > 1 {
+ path = fmt.Sprintf(` at "%s"`, v.renderPath())
+ }
+ v.err = v.newInvalidVariableError(fmt.Sprintf(`%s%s; Field "%s.%s" must be non-null.`, v.invalidValueMessage(variableName, invalidValue), path, string(typeName), string(fieldName)))
+}
+
+func (v *variablesVisitor) inputObjectTypeDefinitionIsOneOf(ref int) bool {
+ definition := v.definition.InputObjectTypeDefinitions[ref]
+ if !definition.HasDirectives {
+ return false
+ }
+
+ for _, directiveRef := range definition.Directives.Refs {
+ if bytes.Equal(v.definition.DirectiveNameBytes(directiveRef), oneOfDirectiveNameBytes) {
+ return true
+ }
+ }
+
+ return false
+}
+
func (v *variablesVisitor) traverseFieldDefinitionType(fieldTypeDefinitionNodeKind ast.NodeKind, fieldName ast.ByteSlice, jsonValue *astjson.Value, typeRef, inputFieldRef int) {
if v.definition.TypeIsNonNull(typeRef) {
if jsonValue == nil || jsonValue.Type() == astjson.TypeNull {
@@ -386,6 +423,7 @@ func (v *variablesVisitor) traverseNamedTypeNode(jsonValue *astjson.Value, typeN
v.renderVariableInvalidObjectTypeError(typeName, jsonValue)
return
}
+ isOneOf := v.inputObjectTypeDefinitionIsOneOf(fieldTypeDefinitionNode.Ref)
inputFieldRefs := v.definition.NodeInputFieldDefinitions(fieldTypeDefinitionNode)
for _, inputFieldRef := range inputFieldRefs {
if v.err != nil {
@@ -401,11 +439,22 @@ func (v *variablesVisitor) traverseNamedTypeNode(jsonValue *astjson.Value, typeN
}
// validate that all input fields present in object are defined in the input object definition
obj := jsonValue.GetObject()
+ nonNullFieldCount := 0
+ var nullFieldName []byte
keys := make([][]byte, obj.Len())
i := 0
- obj.Visit(func(key []byte, v *astjson.Value) {
+ obj.Visit(func(key []byte, value *astjson.Value) {
keys[i] = key
i++
+ if isOneOf {
+ if value.Type() == astjson.TypeNull {
+ if len(nullFieldName) == 0 {
+ nullFieldName = append(nullFieldName, key...)
+ }
+ } else {
+ nonNullFieldCount++
+ }
+ }
})
for i := range keys {
inputFieldName := keys[i]
@@ -415,6 +464,16 @@ func (v *variablesVisitor) traverseNamedTypeNode(jsonValue *astjson.Value, typeN
return
}
}
+ if isOneOf {
+ if len(nullFieldName) != 0 {
+ v.renderVariableOneOfFieldMustBeNonNullError(typeName, nullFieldName)
+ return
+ }
+ if nonNullFieldCount != 1 {
+ v.renderVariableOneOfInputMustSpecifyExactlyOneFieldError(typeName)
+ return
+ }
+ }
case ast.NodeKindScalarTypeDefinition:
switch unsafebytes.BytesToString(typeName) {
case "String":
diff --git a/app/v2/pkg/variablesvalidation/variablesvalidation_oneof_test.go b/app/v2/pkg/variablesvalidation/variablesvalidation_oneof_test.go
new file mode 100644
index 0000000..28a089b
--- /dev/null
+++ b/app/v2/pkg/variablesvalidation/variablesvalidation_oneof_test.go
@@ -0,0 +1,59 @@
+package variablesvalidation
+
+import (
+ "testing"
+
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
+)
+
+func TestVariablesValidation_OneOfInputObjects(t *testing.T) {
+ schema := `
+ input UserBy @oneOf {
+ id: ID
+ username: String
+ }
+ type Query {
+ user(by: UserBy!): String
+ }
+ `
+
+ t.Run("invalid when object is empty", func(t *testing.T) {
+ err := runTest(t, testCase{
+ schema: schema,
+ operation: `query($by: UserBy!) { user(by: $by) }`,
+ variables: `{"by":{}}`,
+ })
+ require.Error(t, err)
+ assert.Equal(t, `Variable "$by" got invalid value; OneOf Input Object "UserBy" must specify exactly one key.`, err.Error())
+ })
+
+ t.Run("invalid when provided field is null", func(t *testing.T) {
+ err := runTest(t, testCase{
+ schema: schema,
+ operation: `query($by: UserBy!) { user(by: $by) }`,
+ variables: `{"by":{"id":null}}`,
+ })
+ require.Error(t, err)
+ assert.Equal(t, `Variable "$by" got invalid value; Field "UserBy.id" must be non-null.`, err.Error())
+ })
+
+ t.Run("invalid when more than one field is provided", func(t *testing.T) {
+ err := runTest(t, testCase{
+ schema: schema,
+ operation: `query($by: UserBy!) { user(by: $by) }`,
+ variables: `{"by":{"id":"1","username":"Ada"}}`,
+ })
+ require.Error(t, err)
+ assert.Equal(t, `Variable "$by" got invalid value; OneOf Input Object "UserBy" must specify exactly one key.`, err.Error())
+ })
+
+ t.Run("valid when exactly one non-null field is provided", func(t *testing.T) {
+ err := runTest(t, testCase{
+ schema: schema,
+ operation: `query($by: UserBy!) { user(by: $by) }`,
+ variables: `{"by":{"id":"1"}}`,
+ })
+ require.NoError(t, err)
+ })
+}