agent_patch
runs/2026-02-21__03-36-16__gpt-5-1-codex-mini/flux-pr-1308/flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/agent-logs/agent.patch
122804 bytes
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/execution/engine/engine_config_test.go b/app/execution/engine/engine_config_test.go
index d824273..8aad9e5 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/execution/engine/engine_config_test.go
+++ b/app/execution/engine/engine_config_test.go
@@ -395,6 +395,12 @@ directive @deprecated(
reason: String = "No longer supported"
) on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION
+
+"""
+Marks an input object type so that exactly one of its fields must be supplied with a non-null value.
+"""
+directive @oneOf on INPUT_OBJECT
+
directive @specifiedBy(
url: String!
) on SCALAR
@@ -541,6 +547,7 @@ type __Type {
possibleTypes: [__Type!]
enumValues(includeDeprecated: Boolean = false): [__EnumValue!]
inputFields(includeDeprecated: Boolean = false): [__InputValue!]
+isOneOf: Boolean!
ofType: __Type
specifiedByURL: String
__typename: String!
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/execution/engine/testdata/full_introspection.json b/app/execution/engine/testdata/full_introspection.json
index b61c532..5b61745 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/execution/engine/testdata/full_introspection.json
+++ b/app/execution/engine/testdata/full_introspection.json
@@ -35,7 +35,8 @@
"name": "Starship",
"ofType": null
}
- ]
+ ],
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -128,7 +129,8 @@
"inputFields": [],
"interfaces": [],
"enumValues": null,
- "possibleTypes": []
+ "possibleTypes": [],
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -166,7 +168,8 @@
"inputFields": [],
"interfaces": [],
"enumValues": null,
- "possibleTypes": []
+ "possibleTypes": [],
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -193,7 +196,8 @@
"inputFields": [],
"interfaces": [],
"enumValues": null,
- "possibleTypes": []
+ "possibleTypes": [],
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -218,7 +222,8 @@
],
"interfaces": [],
"enumValues": null,
- "possibleTypes": []
+ "possibleTypes": [],
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -273,7 +278,8 @@
"inputFields": [],
"interfaces": [],
"enumValues": null,
- "possibleTypes": []
+ "possibleTypes": [],
+ "isOneOf": false
},
{
"kind": "ENUM",
@@ -302,7 +308,8 @@
"deprecationReason": "No longer supported"
}
],
- "possibleTypes": []
+ "possibleTypes": [],
+ "isOneOf": false
},
{
"kind": "INTERFACE",
@@ -356,7 +363,8 @@
"name": "Droid",
"ofType": null
}
- ]
+ ],
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -421,7 +429,8 @@
}
],
"enumValues": null,
- "possibleTypes": []
+ "possibleTypes": [],
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -486,7 +495,8 @@
}
],
"enumValues": null,
- "possibleTypes": []
+ "possibleTypes": [],
+ "isOneOf": false
},
{
"kind": "INTERFACE",
@@ -519,7 +529,8 @@
"name": "Starship",
"ofType": null
}
- ]
+ ],
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -568,7 +579,8 @@
}
],
"enumValues": null,
- "possibleTypes": []
+ "possibleTypes": [],
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -578,7 +590,8 @@
"inputFields": [],
"interfaces": [],
"enumValues": null,
- "possibleTypes": []
+ "possibleTypes": [],
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -588,7 +601,8 @@
"inputFields": [],
"interfaces": [],
"enumValues": null,
- "possibleTypes": []
+ "possibleTypes": [],
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -598,7 +612,8 @@
"inputFields": [],
"interfaces": [],
"enumValues": null,
- "possibleTypes": []
+ "possibleTypes": [],
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -608,7 +623,8 @@
"inputFields": [],
"interfaces": [],
"enumValues": null,
- "possibleTypes": []
+ "possibleTypes": [],
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -618,7 +634,8 @@
"inputFields": [],
"interfaces": [],
"enumValues": null,
- "possibleTypes": []
+ "possibleTypes": [],
+ "isOneOf": false
}
],
"directives": [
@@ -713,6 +730,14 @@
}
]
},
+ {
+ "name": "oneOf",
+ "description": "Marks an input object type so that exactly one of its fields must be supplied with a non-null value.",
+ "locations": [
+ "INPUT_OBJECT"
+ ],
+ "args": []
+ },
{
"name": "specifiedBy",
"description": "",
@@ -739,4 +764,4 @@
]
}
}
-}
\ No newline at end of file
+}
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/execution/engine/testdata/full_introspection_with_deprecated.json b/app/execution/engine/testdata/full_introspection_with_deprecated.json
index ebfbecf..bf0dfc7 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/execution/engine/testdata/full_introspection_with_deprecated.json
+++ b/app/execution/engine/testdata/full_introspection_with_deprecated.json
@@ -35,7 +35,8 @@
"name": "Starship",
"ofType": null
}
- ]
+ ],
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -128,7 +129,8 @@
"inputFields": [],
"interfaces": [],
"enumValues": null,
- "possibleTypes": []
+ "possibleTypes": [],
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -180,7 +182,8 @@
"inputFields": [],
"interfaces": [],
"enumValues": null,
- "possibleTypes": []
+ "possibleTypes": [],
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -207,7 +210,8 @@
"inputFields": [],
"interfaces": [],
"enumValues": null,
- "possibleTypes": []
+ "possibleTypes": [],
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -242,7 +246,8 @@
],
"interfaces": [],
"enumValues": null,
- "possibleTypes": []
+ "possibleTypes": [],
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -297,7 +302,8 @@
"inputFields": [],
"interfaces": [],
"enumValues": null,
- "possibleTypes": []
+ "possibleTypes": [],
+ "isOneOf": false
},
{
"kind": "ENUM",
@@ -326,7 +332,8 @@
"deprecationReason": "No longer supported"
}
],
- "possibleTypes": []
+ "possibleTypes": [],
+ "isOneOf": false
},
{
"kind": "INTERFACE",
@@ -380,7 +387,8 @@
"name": "Droid",
"ofType": null
}
- ]
+ ],
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -445,7 +453,8 @@
}
],
"enumValues": null,
- "possibleTypes": []
+ "possibleTypes": [],
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -510,7 +519,8 @@
}
],
"enumValues": null,
- "possibleTypes": []
+ "possibleTypes": [],
+ "isOneOf": false
},
{
"kind": "INTERFACE",
@@ -543,7 +553,8 @@
"name": "Starship",
"ofType": null
}
- ]
+ ],
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -592,7 +603,8 @@
}
],
"enumValues": null,
- "possibleTypes": []
+ "possibleTypes": [],
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -602,7 +614,8 @@
"inputFields": [],
"interfaces": [],
"enumValues": null,
- "possibleTypes": []
+ "possibleTypes": [],
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -612,7 +625,8 @@
"inputFields": [],
"interfaces": [],
"enumValues": null,
- "possibleTypes": []
+ "possibleTypes": [],
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -622,7 +636,8 @@
"inputFields": [],
"interfaces": [],
"enumValues": null,
- "possibleTypes": []
+ "possibleTypes": [],
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -632,7 +647,8 @@
"inputFields": [],
"interfaces": [],
"enumValues": null,
- "possibleTypes": []
+ "possibleTypes": [],
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -642,7 +658,8 @@
"inputFields": [],
"interfaces": [],
"enumValues": null,
- "possibleTypes": []
+ "possibleTypes": [],
+ "isOneOf": false
}
],
"directives": [
@@ -747,6 +764,14 @@
}
]
},
+ {
+ "name": "oneOf",
+ "description": "Marks an input object type so that exactly one of its fields must be supplied with a non-null value.",
+ "locations": [
+ "INPUT_OBJECT"
+ ],
+ "args": []
+ },
{
"name": "specifiedBy",
"description": "",
@@ -773,4 +798,4 @@
]
}
}
-}
\ No newline at end of file
+}
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/execution/engine/testdata/full_introspection_with_typenames.json b/app/execution/engine/testdata/full_introspection_with_typenames.json
index 6ed6f65..c894151 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/execution/engine/testdata/full_introspection_with_typenames.json
+++ b/app/execution/engine/testdata/full_introspection_with_typenames.json
@@ -43,7 +43,8 @@
"name": "Starship",
"ofType": null
}
- ]
+ ],
+ "isOneOf": false
},
{
"__typename": "__Type",
@@ -149,7 +150,8 @@
"inputFields": [],
"interfaces": [],
"enumValues": null,
- "possibleTypes": []
+ "possibleTypes": [],
+ "isOneOf": false
},
{
"__typename": "__Type",
@@ -192,7 +194,8 @@
"inputFields": [],
"interfaces": [],
"enumValues": null,
- "possibleTypes": []
+ "possibleTypes": [],
+ "isOneOf": false
},
{
"__typename": "__Type",
@@ -222,7 +225,8 @@
"inputFields": [],
"interfaces": [],
"enumValues": null,
- "possibleTypes": []
+ "possibleTypes": [],
+ "isOneOf": false
},
{
"__typename": "__Type",
@@ -250,7 +254,8 @@
],
"interfaces": [],
"enumValues": null,
- "possibleTypes": []
+ "possibleTypes": [],
+ "isOneOf": false
},
{
"__typename": "__Type",
@@ -312,7 +317,8 @@
"inputFields": [],
"interfaces": [],
"enumValues": null,
- "possibleTypes": []
+ "possibleTypes": [],
+ "isOneOf": false
},
{
"__typename": "__Type",
@@ -345,7 +351,8 @@
"deprecationReason": "No longer supported"
}
],
- "possibleTypes": []
+ "possibleTypes": [],
+ "isOneOf": false
},
{
"__typename": "__Type",
@@ -406,7 +413,8 @@
"name": "Droid",
"ofType": null
}
- ]
+ ],
+ "isOneOf": false
},
{
"__typename": "__Type",
@@ -479,7 +487,8 @@
}
],
"enumValues": null,
- "possibleTypes": []
+ "possibleTypes": [],
+ "isOneOf": false
},
{
"__typename": "__Type",
@@ -552,7 +561,8 @@
}
],
"enumValues": null,
- "possibleTypes": []
+ "possibleTypes": [],
+ "isOneOf": false
},
{
"__typename": "__Type",
@@ -589,7 +599,8 @@
"name": "Starship",
"ofType": null
}
- ]
+ ],
+ "isOneOf": false
},
{
"__typename": "__Type",
@@ -644,7 +655,8 @@
}
],
"enumValues": null,
- "possibleTypes": []
+ "possibleTypes": [],
+ "isOneOf": false
},
{
"__typename": "__Type",
@@ -655,7 +667,8 @@
"inputFields": [],
"interfaces": [],
"enumValues": null,
- "possibleTypes": []
+ "possibleTypes": [],
+ "isOneOf": false
},
{
"__typename": "__Type",
@@ -666,7 +679,8 @@
"inputFields": [],
"interfaces": [],
"enumValues": null,
- "possibleTypes": []
+ "possibleTypes": [],
+ "isOneOf": false
},
{
"__typename": "__Type",
@@ -677,7 +691,8 @@
"inputFields": [],
"interfaces": [],
"enumValues": null,
- "possibleTypes": []
+ "possibleTypes": [],
+ "isOneOf": false
},
{
"__typename": "__Type",
@@ -688,7 +703,8 @@
"inputFields": [],
"interfaces": [],
"enumValues": null,
- "possibleTypes": []
+ "possibleTypes": [],
+ "isOneOf": false
},
{
"__typename": "__Type",
@@ -699,7 +715,8 @@
"inputFields": [],
"interfaces": [],
"enumValues": null,
- "possibleTypes": []
+ "possibleTypes": [],
+ "isOneOf": false
}
],
"directives": [
@@ -806,6 +823,15 @@
}
]
},
+ {
+ "__typename": "__Directive",
+ "name": "oneOf",
+ "description": "Marks an input object type so that exactly one of its fields must be supplied with a non-null value.",
+ "locations": [
+ "INPUT_OBJECT"
+ ],
+ "args": []
+ },
{
"__typename": "__Directive",
"name": "specifiedBy",
@@ -835,4 +861,4 @@
]
}
}
-}
\ No newline at end of file
+}
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/ast/ast_directive.go b/app/v2/pkg/ast/ast_directive.go
index 9b70b52..c25cda6 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/ast/ast_directive.go
+++ b/app/v2/pkg/ast/ast_directive.go
@@ -12,6 +12,8 @@ type DirectiveList struct {
Refs []int
}
+const OneOfDirectiveName = "oneOf"
+
type Directive struct {
At position.Position // @
Name ByteSliceReference // e.g. include
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/astprinter/astprinter_test.go b/app/v2/pkg/astprinter/astprinter_test.go
index 8dbd5d7..a823c21 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/astprinter/astprinter_test.go
+++ b/app/v2/pkg/astprinter/astprinter_test.go
@@ -1023,6 +1023,7 @@ type __Type {
possibleTypes: [__Type!]
enumValues(includeDeprecated: Boolean = false): [__EnumValue!]
inputFields: [__InputValue!]
+ isOneOf: Boolean!
ofType: __Type
}
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/asttransform/baseschema.go b/app/v2/pkg/asttransform/baseschema.go
index 45a6ebc..b083d23 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/asttransform/baseschema.go
+++ b/app/v2/pkg/asttransform/baseschema.go
@@ -166,6 +166,11 @@ directive @deprecated(
reason: String = "No longer supported"
) on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION | ENUM_VALUE
+"""
+Marks an input object type so that exactly one of its fields must be supplied with a non-null value.
+"""
+directive @oneOf on INPUT_OBJECT
+
directive @specifiedBy(url: String!) on SCALAR
"""
@@ -308,6 +313,7 @@ type __Type {
enumValues(includeDeprecated: Boolean = false): [__EnumValue!]
# must be non-null for INPUT_OBJECT, otherwise null.
inputFields(includeDeprecated: Boolean = false): [__InputValue!]
+ isOneOf: Boolean!
# must be non-null for NON_NULL and LIST, otherwise null.
ofType: __Type
# may be non-null for custom SCALAR, otherwise null.
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/asttransform/fixtures/complete.golden b/app/v2/pkg/asttransform/fixtures/complete.golden
index 27488b6..f26d477 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/asttransform/fixtures/complete.golden
+++ b/app/v2/pkg/asttransform/fixtures/complete.golden
@@ -53,6 +53,12 @@ directive @deprecated(
reason: String = "No longer supported"
) on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION
+
+"""
+Marks an input object type so that exactly one of its fields must be supplied with a non-null value.
+"""
+directive @oneOf on INPUT_OBJECT
+
directive @specifiedBy(
url: String!
) on SCALAR
@@ -199,6 +205,7 @@ type __Type {
possibleTypes: [__Type!]
enumValues(includeDeprecated: Boolean = false): [__EnumValue!]
inputFields(includeDeprecated: Boolean = false): [__InputValue!]
+isOneOf: Boolean!
ofType: __Type
specifiedByURL: String
__typename: String!
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/asttransform/fixtures/custom_query_name.golden b/app/v2/pkg/asttransform/fixtures/custom_query_name.golden
index 3bcc2af..9656b75 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/asttransform/fixtures/custom_query_name.golden
+++ b/app/v2/pkg/asttransform/fixtures/custom_query_name.golden
@@ -53,6 +53,12 @@ directive @deprecated(
reason: String = "No longer supported"
) on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION
+
+"""
+Marks an input object type so that exactly one of its fields must be supplied with a non-null value.
+"""
+directive @oneOf on INPUT_OBJECT
+
directive @specifiedBy(
url: String!
) on SCALAR
@@ -199,6 +205,7 @@ type __Type {
possibleTypes: [__Type!]
enumValues(includeDeprecated: Boolean = false): [__EnumValue!]
inputFields(includeDeprecated: Boolean = false): [__InputValue!]
+isOneOf: Boolean!
ofType: __Type
specifiedByURL: String
__typename: String!
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/asttransform/fixtures/mutation_only.golden b/app/v2/pkg/asttransform/fixtures/mutation_only.golden
index 66da6be..fd88f64 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/asttransform/fixtures/mutation_only.golden
+++ b/app/v2/pkg/asttransform/fixtures/mutation_only.golden
@@ -45,6 +45,12 @@ directive @deprecated(
reason: String = "No longer supported"
) on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION
+
+"""
+Marks an input object type so that exactly one of its fields must be supplied with a non-null value.
+"""
+directive @oneOf on INPUT_OBJECT
+
directive @specifiedBy(
url: String!
) on SCALAR
@@ -191,6 +197,7 @@ type __Type {
possibleTypes: [__Type!]
enumValues(includeDeprecated: Boolean = false): [__EnumValue!]
inputFields(includeDeprecated: Boolean = false): [__InputValue!]
+isOneOf: Boolean!
ofType: __Type
specifiedByURL: String
__typename: String!
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/asttransform/fixtures/schema_missing.golden b/app/v2/pkg/asttransform/fixtures/schema_missing.golden
index 27488b6..f26d477 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/asttransform/fixtures/schema_missing.golden
+++ b/app/v2/pkg/asttransform/fixtures/schema_missing.golden
@@ -53,6 +53,12 @@ directive @deprecated(
reason: String = "No longer supported"
) on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION
+
+"""
+Marks an input object type so that exactly one of its fields must be supplied with a non-null value.
+"""
+directive @oneOf on INPUT_OBJECT
+
directive @specifiedBy(
url: String!
) on SCALAR
@@ -199,6 +205,7 @@ type __Type {
possibleTypes: [__Type!]
enumValues(includeDeprecated: Boolean = false): [__EnumValue!]
inputFields(includeDeprecated: Boolean = false): [__InputValue!]
+isOneOf: Boolean!
ofType: __Type
specifiedByURL: String
__typename: String!
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/asttransform/fixtures/simple.golden b/app/v2/pkg/asttransform/fixtures/simple.golden
index 27488b6..f26d477 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/asttransform/fixtures/simple.golden
+++ b/app/v2/pkg/asttransform/fixtures/simple.golden
@@ -53,6 +53,12 @@ directive @deprecated(
reason: String = "No longer supported"
) on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION
+
+"""
+Marks an input object type so that exactly one of its fields must be supplied with a non-null value.
+"""
+directive @oneOf on INPUT_OBJECT
+
directive @specifiedBy(
url: String!
) on SCALAR
@@ -199,6 +205,7 @@ type __Type {
possibleTypes: [__Type!]
enumValues(includeDeprecated: Boolean = false): [__EnumValue!]
inputFields(includeDeprecated: Boolean = false): [__InputValue!]
+isOneOf: Boolean!
ofType: __Type
specifiedByURL: String
__typename: String!
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/asttransform/fixtures/subscription_only.golden b/app/v2/pkg/asttransform/fixtures/subscription_only.golden
index e8e8573..8f6bf9a 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/asttransform/fixtures/subscription_only.golden
+++ b/app/v2/pkg/asttransform/fixtures/subscription_only.golden
@@ -44,6 +44,12 @@ directive @deprecated(
reason: String = "No longer supported"
) on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION
+
+"""
+Marks an input object type so that exactly one of its fields must be supplied with a non-null value.
+"""
+directive @oneOf on INPUT_OBJECT
+
directive @specifiedBy(
url: String!
) on SCALAR
@@ -190,6 +196,7 @@ type __Type {
possibleTypes: [__Type!]
enumValues(includeDeprecated: Boolean = false): [__EnumValue!]
inputFields(includeDeprecated: Boolean = false): [__InputValue!]
+isOneOf: Boolean!
ofType: __Type
specifiedByURL: String
__typename: String!
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/asttransform/fixtures/subscription_renamed.golden b/app/v2/pkg/asttransform/fixtures/subscription_renamed.golden
index e78cb9d..ab1d0eb 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/asttransform/fixtures/subscription_renamed.golden
+++ b/app/v2/pkg/asttransform/fixtures/subscription_renamed.golden
@@ -44,6 +44,12 @@ directive @deprecated(
reason: String = "No longer supported"
) on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION
+
+"""
+Marks an input object type so that exactly one of its fields must be supplied with a non-null value.
+"""
+directive @oneOf on INPUT_OBJECT
+
directive @specifiedBy(
url: String!
) on SCALAR
@@ -190,6 +196,7 @@ type __Type {
possibleTypes: [__Type!]
enumValues(includeDeprecated: Boolean = false): [__EnumValue!]
inputFields(includeDeprecated: Boolean = false): [__InputValue!]
+isOneOf: Boolean!
ofType: __Type
specifiedByURL: String
__typename: String!
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/asttransform/fixtures/with_mutation_subscription.golden b/app/v2/pkg/asttransform/fixtures/with_mutation_subscription.golden
index 229b242..94b1172 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/asttransform/fixtures/with_mutation_subscription.golden
+++ b/app/v2/pkg/asttransform/fixtures/with_mutation_subscription.golden
@@ -64,6 +64,12 @@ directive @deprecated(
reason: String = "No longer supported"
) on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION
+
+"""
+Marks an input object type so that exactly one of its fields must be supplied with a non-null value.
+"""
+directive @oneOf on INPUT_OBJECT
+
directive @specifiedBy(
url: String!
) on SCALAR
@@ -210,6 +216,7 @@ type __Type {
possibleTypes: [__Type!]
enumValues(includeDeprecated: Boolean = false): [__EnumValue!]
inputFields(includeDeprecated: Boolean = false): [__InputValue!]
+isOneOf: Boolean!
ofType: __Type
specifiedByURL: String
__typename: String!
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/astvalidation/definition_validation.go b/app/v2/pkg/astvalidation/definition_validation.go
index 3b1d009..8793ee0 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/astvalidation/definition_validation.go
+++ b/app/v2/pkg/astvalidation/definition_validation.go
@@ -18,6 +18,7 @@ func DefaultDefinitionValidator() *DefinitionValidator {
RequireDefinedTypesForExtensions(),
ImplementTransitiveInterfaces(),
ImplementingTypesAreSupersets(),
+ OneOfInputObjects(),
DirectivesAreUniquePerLocation(),
)
}
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/astvalidation/operation_rule_values.go b/app/v2/pkg/astvalidation/operation_rule_values.go
index 5030117..80ddde4 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/astvalidation/operation_rule_values.go
+++ b/app/v2/pkg/astvalidation/operation_rule_values.go
@@ -430,6 +430,10 @@ func (v *valuesVisitor) valueSatisfiesInputObjectTypeDefinition(value ast.Value,
return false
}
+ if v.inputObjectTypeIsOneOf(inputObjectTypeDefinition) {
+ return v.objectValueSatisfiesOneOfConstraint(value, inputObjectTypeDefinition)
+ }
+
return true
}
@@ -514,6 +518,35 @@ func (v *valuesVisitor) variableValueHasMatchingTypeName(value ast.Value, defini
return true
}
+func (v *valuesVisitor) inputObjectTypeIsOneOf(definitionRef int) bool {
+ node := ast.Node{Kind: ast.NodeKindInputObjectTypeDefinition, Ref: definitionRef}
+ return v.definition.NodeHasDirectiveByNameString(node, ast.OneOfDirectiveName)
+}
+
+func (v *valuesVisitor) objectValueSatisfiesOneOfConstraint(value ast.Value, inputObjectTypeDefinition int) bool {
+ fieldRefs := v.operation.ObjectValues[value.Ref].Refs
+ if len(fieldRefs) != 1 {
+ v.Report.AddExternalError(operationreport.ErrOneOfInputObjectSingleField(
+ v.definition.InputObjectTypeDefinitionNameBytes(inputObjectTypeDefinition),
+ value.Position,
+ ))
+ return false
+ }
+
+ fieldRef := fieldRefs[0]
+ fieldValue := v.operation.ObjectFieldValue(fieldRef)
+ if fieldValue.Kind == ast.ValueKindNull {
+ v.Report.AddExternalError(operationreport.ErrOneOfInputObjectFieldMustBeNonNull(
+ v.operation.ObjectFieldNameBytes(fieldRef),
+ v.definition.InputObjectTypeDefinitionNameBytes(inputObjectTypeDefinition),
+ v.operation.ObjectField(fieldRef).Position,
+ ))
+ return false
+ }
+
+ return true
+}
+
func (v *valuesVisitor) handleTypeError(value ast.Value, definitionTypeRef int) {
printedValue, printedType, ok := v.printValueAndUnderlyingType(value, definitionTypeRef)
if !ok {
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/astvalidation/operation_validation_test.go b/app/v2/pkg/astvalidation/operation_validation_test.go
index 57e056f..512d0cd 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/astvalidation/operation_validation_test.go
+++ b/app/v2/pkg/astvalidation/operation_validation_test.go
@@ -3105,6 +3105,43 @@ type Query {
Values(), Valid)
})
})
+ const oneOfDefinition = `
+ input VariantInput @oneOf {
+ foo: String
+ bar: String
+ }
+
+ type Query {
+ variant(input: VariantInput!): Boolean
+ }
+ `
+
+ t.Run("OneOf input objects", func(t *testing.T) {
+ t.Run("requires exactly one field", func(t *testing.T) {
+ runWithDefinition(t, oneOfDefinition, `{
+ variant(input: {})
+ }`, Values(), Invalid, withValidationErrors(`Exactly one key must be specified for OneOf input value "VariantInput".`))
+ })
+
+ t.Run("rejects multiple fields", func(t *testing.T) {
+ runWithDefinition(t, oneOfDefinition, `{
+ variant(input: { foo: "A", bar: "B" })
+ }`, Values(), Invalid, withValidationErrors(`Exactly one key must be specified for OneOf input value "VariantInput".`))
+ })
+
+ t.Run("rejects null field", func(t *testing.T) {
+ runWithDefinition(t, oneOfDefinition, `{
+ variant(input: { foo: null })
+ }`, Values(), Invalid, withValidationErrors(`Value for member field "foo" of OneOf input object "VariantInput" must be non-null.`))
+ })
+
+ t.Run("accepts single non-null field", func(t *testing.T) {
+ runWithDefinition(t, oneOfDefinition, `{
+ variant(input: { foo: "A" })
+ }`, Values(), Valid)
+ })
+ })
+
t.Run("5.6.2 Input Object Field Names", func(t *testing.T) {
t.Run("147", func(t *testing.T) {
run(t, `{
diff --git a/app/v2/pkg/astvalidation/rule_one_of_input_objects.go b/app/v2/pkg/astvalidation/rule_one_of_input_objects.go
new file mode 100644
index 0000000..ecd76e9
--- /dev/null
+++ b/app/v2/pkg/astvalidation/rule_one_of_input_objects.go
@@ -0,0 +1,95 @@
+package astvalidation
+
+import (
+ "github.com/wundergraph/graphql-go-tools/v2/pkg/ast"
+ "github.com/wundergraph/graphql-go-tools/v2/pkg/astvisitor"
+ "github.com/wundergraph/graphql-go-tools/v2/pkg/operationreport"
+)
+
+func OneOfInputObjects() Rule {
+ return func(walker *astvisitor.Walker) {
+ visitor := &oneOfInputObjectsVisitor{
+ Walker: walker,
+ }
+
+ walker.RegisterEnterDocumentVisitor(visitor)
+ walker.RegisterEnterInputObjectTypeDefinitionVisitor(visitor)
+ walker.RegisterEnterInputObjectTypeExtensionVisitor(visitor)
+ }
+}
+
+type oneOfInputObjectsVisitor struct {
+ *astvisitor.Walker
+
+ definition *ast.Document
+}
+
+func (v *oneOfInputObjectsVisitor) EnterDocument(operation, definition *ast.Document) {
+ v.definition = operation
+}
+
+func (v *oneOfInputObjectsVisitor) EnterInputObjectTypeDefinition(ref int) {
+ node := ast.Node{Kind: ast.NodeKindInputObjectTypeDefinition, Ref: ref}
+ if !v.definition.NodeHasDirectiveByNameString(node, ast.OneOfDirectiveName) {
+ return
+ }
+
+ typeName := v.definition.InputObjectTypeDefinitionNameBytes(ref)
+ for _, fieldRef := range v.definition.InputObjectTypeDefinitions[ref].InputFieldsDefinition.Refs {
+ if v.definition.TypeIsNonNull(v.definition.InputValueDefinitionType(fieldRef)) {
+ v.Report.AddExternalError(operationreport.ErrOneOfFieldMustBeNullable(
+ v.definition.InputValueDefinitionNameBytes(fieldRef),
+ typeName,
+ ))
+ }
+ if v.definition.InputValueDefinitionHasDefaultValue(fieldRef) {
+ v.Report.AddExternalError(operationreport.ErrOneOfFieldMustNotHaveDefaultValue(
+ v.definition.InputValueDefinitionNameBytes(fieldRef),
+ typeName,
+ ))
+ }
+ }
+}
+
+func (v *oneOfInputObjectsVisitor) EnterInputObjectTypeExtension(ref int) {
+ node := ast.Node{Kind: ast.NodeKindInputObjectTypeExtension, Ref: ref}
+ typeName := v.definition.InputObjectTypeExtensionNameBytes(ref)
+
+ if v.definition.NodeHasDirectiveByNameString(node, ast.OneOfDirectiveName) {
+ v.Report.AddExternalError(operationreport.ErrOneOfDirectiveOnInputObjectExtension(typeName))
+ }
+
+ nodes, exists := v.definition.Index.NodesByNameBytes(typeName)
+ if !exists {
+ return
+ }
+
+ baseHasOneOf := false
+ for _, n := range nodes {
+ if n.Kind == ast.NodeKindInputObjectTypeDefinition {
+ if v.definition.NodeHasDirectiveByNameString(n, ast.OneOfDirectiveName) {
+ baseHasOneOf = true
+ break
+ }
+ }
+ }
+
+ if !baseHasOneOf {
+ return
+ }
+
+ for _, fieldRef := range v.definition.InputObjectTypeExtensions[ref].InputFieldsDefinition.Refs {
+ if v.definition.TypeIsNonNull(v.definition.InputValueDefinitionType(fieldRef)) {
+ v.Report.AddExternalError(operationreport.ErrOneOfFieldMustBeNullable(
+ v.definition.InputValueDefinitionNameBytes(fieldRef),
+ typeName,
+ ))
+ }
+ if v.definition.InputValueDefinitionHasDefaultValue(fieldRef) {
+ v.Report.AddExternalError(operationreport.ErrOneOfFieldMustNotHaveDefaultValue(
+ v.definition.InputValueDefinitionNameBytes(fieldRef),
+ typeName,
+ ))
+ }
+ }
+}
diff --git a/app/v2/pkg/astvalidation/rule_one_of_input_objects_test.go b/app/v2/pkg/astvalidation/rule_one_of_input_objects_test.go
new file mode 100644
index 0000000..ce44b51
--- /dev/null
+++ b/app/v2/pkg/astvalidation/rule_one_of_input_objects_test.go
@@ -0,0 +1,56 @@
+package astvalidation
+
+import "testing"
+
+func TestOneOfInputObjects(t *testing.T) {
+ t.Run("field must be nullable", func(t *testing.T) {
+ runDefinitionValidation(t, `
+ input OneOfInput @oneOf {
+ nullableField: String
+ nonNullableField: String!
+ }
+ `, Invalid, OneOfInputObjects(),
+ )
+ })
+
+ t.Run("field must not have default value", func(t *testing.T) {
+ runDefinitionValidation(t, `
+ input OneOfInput @oneOf {
+ fieldWithDefault: String = "default"
+ }
+ `, Invalid, OneOfInputObjects(),
+ )
+ })
+
+ t.Run("extension must not declare @oneOf", func(t *testing.T) {
+ runDefinitionValidation(t, `
+ input Base {}
+ extend input Base @oneOf
+ `, Invalid, OneOfInputObjects(),
+ )
+ })
+
+ t.Run("extension on @oneOf must keep fields nullable", func(t *testing.T) {
+ runDefinitionValidation(t, `
+ input Base @oneOf {
+ a: String
+ }
+ extend input Base {
+ b: String!
+ }
+ `, Invalid, OneOfInputObjects(),
+ )
+ })
+
+ t.Run("extension on @oneOf must not add default values", func(t *testing.T) {
+ runDefinitionValidation(t, `
+ input Base @oneOf {
+ a: String
+ }
+ extend input Base {
+ b: String = "default"
+ }
+ `, Invalid, OneOfInputObjects(),
+ )
+ })
+}
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/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..223e187 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/engine/datasource/introspection_datasource/fixtures/schema_introspection.golden
+++ b/app/v2/pkg/engine/datasource/introspection_datasource/fixtures/schema_introspection.golden
@@ -118,7 +118,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "ENUM",
@@ -150,7 +151,8 @@
}
],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -180,7 +182,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -189,7 +192,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -198,7 +202,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -207,7 +212,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -216,7 +222,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -225,7 +232,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
}
],
"directives": [
@@ -321,6 +329,16 @@
"isRepeatable": false,
"__typename": "__Directive"
},
+ {
+ "name": "oneOf",
+ "description": "Marks an input object type so that exactly one of its fields must be supplied with a non-null value.",
+ "locations": [
+ "INPUT_OBJECT"
+ ],
+ "args": [],
+ "isRepeatable": false,
+ "__typename": "__Directive"
+ },
{
"name": "specifiedBy",
"description": "",
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/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..5e3cc0c 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/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
@@ -191,7 +191,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -241,7 +242,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -266,7 +268,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "ENUM",
@@ -298,7 +301,8 @@
}
],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -328,7 +332,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -337,7 +342,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -346,7 +352,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -355,7 +362,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -364,7 +372,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -373,7 +382,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
}
],
"directives": [
@@ -469,6 +479,16 @@
"isRepeatable": false,
"__typename": "__Directive"
},
+ {
+ "name": "oneOf",
+ "description": "Marks an input object type so that exactly one of its fields must be supplied with a non-null value.",
+ "locations": [
+ "INPUT_OBJECT"
+ ],
+ "args": [],
+ "isRepeatable": false,
+ "__typename": "__Directive"
+ },
{
"name": "specifiedBy",
"description": "",
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/federation/fixtures/federated_schema.golden b/app/v2/pkg/federation/fixtures/federated_schema.golden
index 5a3119c..3a25e56 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/federation/fixtures/federated_schema.golden
+++ b/app/v2/pkg/federation/fixtures/federated_schema.golden
@@ -93,6 +93,12 @@ directive @deprecated(
reason: String = "No longer supported"
) on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION
+
+"""
+Marks an input object type so that exactly one of its fields must be supplied with a non-null value.
+"""
+directive @oneOf on INPUT_OBJECT
+
directive @specifiedBy(
url: String!
) on SCALAR
@@ -239,6 +245,7 @@ type __Type {
possibleTypes: [__Type!]
enumValues(includeDeprecated: Boolean = false): [__EnumValue!]
inputFields(includeDeprecated: Boolean = false): [__InputValue!]
+isOneOf: Boolean!
ofType: __Type
specifiedByURL: String
__typename: String!
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/introspection/fixtures/starwars_introspected.golden b/app/v2/pkg/introspection/fixtures/starwars_introspected.golden
index 5bb9e05..db99eb9 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/introspection/fixtures/starwars_introspected.golden
+++ b/app/v2/pkg/introspection/fixtures/starwars_introspected.golden
@@ -596,7 +596,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -655,7 +656,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -695,7 +697,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "ENUM",
@@ -727,7 +730,8 @@
}
],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "INTERFACE",
@@ -880,7 +884,8 @@
"__typename": "__Type"
}
],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "ENUM",
@@ -905,7 +910,8 @@
}
],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -1128,7 +1134,8 @@
}
],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -1289,7 +1296,8 @@
}
],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -1371,7 +1379,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -1415,7 +1424,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -1473,7 +1483,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -1531,7 +1542,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -1588,7 +1600,8 @@
],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -1655,7 +1668,8 @@
],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -1747,7 +1761,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "UNION",
@@ -1775,7 +1790,8 @@
"__typename": "__Type"
}
],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -1785,7 +1801,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 +1811,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -1803,7 +1821,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -1812,7 +1831,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -1821,7 +1841,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -1830,7 +1851,8 @@
"inputFields": [],
"interfaces": [],
"possibleTypes": [],
- "__typename": "__Type"
+ "__typename": "__Type",
+ "isOneOf": false
}
],
"directives": [
@@ -1956,9 +1978,19 @@
],
"isRepeatable": true,
"__typename": "__Directive"
+ },
+ {
+ "name": "oneOf",
+ "description": "Marks an input object type so that exactly one of its fields must be supplied with a non-null value.",
+ "locations": [
+ "INPUT_OBJECT"
+ ],
+ "args": [],
+ "isRepeatable": false,
+ "__typename": "__Directive"
}
],
"__typename": "__Schema",
"description": "awesome starwars schema"
}
-}
\ No newline at end of file
+}
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/introspection/generator.go b/app/v2/pkg/introspection/generator.go
index 820483f..36480a9 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/introspection/generator.go
+++ b/app/v2/pkg/introspection/generator.go
@@ -315,6 +315,10 @@ func (i *introspectionVisitor) EnterInputObjectTypeDefinition(ref int) {
i.currentType.Kind = INPUTOBJECT
i.currentType.Name = i.definition.InputObjectTypeDefinitionNameString(ref)
i.currentType.Description = i.definition.InputObjectTypeDefinitionDescriptionString(ref)
+ node := ast.Node{Kind: ast.NodeKindInputObjectTypeDefinition, Ref: ref}
+ if i.definition.NodeHasDirectiveByNameString(node, ast.OneOfDirectiveName) {
+ i.currentType.IsOneOf = true
+ }
}
func (i *introspectionVisitor) LeaveInputObjectTypeDefinition(ref int) {
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/introspection/introspection.go b/app/v2/pkg/introspection/introspection.go
index c799e64..ffd490a 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/introspection/introspection.go
+++ b/app/v2/pkg/introspection/introspection.go
@@ -61,6 +61,8 @@ type FullType struct {
Fields []Field `json:"fields,omitempty"`
// not empty for __TypeKind INPUT_OBJECT only
InputFields []InputValue `json:"inputFields"`
+ // indicates if the input object is annotated with @oneOf
+ IsOneOf bool `json:"isOneOf"`
// not empty for __TypeKind OBJECT only
Interfaces []TypeRef `json:"interfaces"`
// not empty for __TypeKind ENUM only
@@ -80,6 +82,7 @@ func NewFullType() *FullType {
EnumValues: make([]EnumValue, 0),
PossibleTypes: make([]TypeRef, 0),
TypeName: "__Type",
+ IsOneOf: false,
}
}
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/introspection/testdata/out_swapi_introspection_response.json b/app/v2/pkg/introspection/testdata/out_swapi_introspection_response.json
index 4b470ba..841c88a 100755
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/introspection/testdata/out_swapi_introspection_response.json
+++ b/app/v2/pkg/introspection/testdata/out_swapi_introspection_response.json
@@ -65,7 +65,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -104,7 +105,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -143,7 +145,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -182,7 +185,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -221,7 +225,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -260,7 +265,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -299,7 +305,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -338,7 +345,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -377,7 +385,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -563,7 +572,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -721,7 +731,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -2471,7 +2482,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -2553,7 +2565,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -2681,7 +2694,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -3049,7 +3063,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -3440,7 +3455,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -3711,7 +3727,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -3992,7 +4009,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -4295,7 +4313,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -4584,7 +4603,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -4775,7 +4795,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -4933,7 +4954,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -6573,7 +6595,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -6655,7 +6678,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -7046,7 +7070,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -7317,7 +7342,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -7598,7 +7624,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -7901,7 +7928,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -8190,7 +8218,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -8252,7 +8281,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -8296,7 +8326,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -14114,7 +14145,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -14348,7 +14380,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -14506,7 +14539,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -15978,7 +16012,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -16060,7 +16095,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -16428,7 +16464,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -16699,7 +16736,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -16980,7 +17018,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -17283,7 +17322,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -17572,7 +17612,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -17810,7 +17851,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -17968,7 +18010,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -19662,7 +19705,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -19744,7 +19788,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -20112,7 +20157,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -20475,7 +20521,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -20514,7 +20561,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -20553,7 +20601,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -20592,7 +20641,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -20631,7 +20681,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -20670,7 +20721,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -20709,7 +20761,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -20748,7 +20801,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -20787,7 +20841,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -20826,7 +20881,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -21074,7 +21130,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -21232,7 +21289,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -22962,7 +23020,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -23044,7 +23103,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -23412,7 +23472,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -23803,7 +23864,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -24073,7 +24135,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -24231,7 +24294,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -26537,7 +26601,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -26619,7 +26684,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -26987,7 +27053,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -27378,7 +27445,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -27592,7 +27660,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -27719,7 +27788,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -28096,7 +28166,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -28501,7 +28572,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -28786,7 +28858,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -29081,7 +29154,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -29398,7 +29472,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -29701,7 +29776,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -29957,7 +30033,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -30115,7 +30192,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -32373,7 +32451,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -32455,7 +32534,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -32823,7 +32903,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -33214,7 +33295,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "ENUM",
@@ -33246,7 +33328,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -33439,7 +33522,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -35237,7 +35321,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "ENUM",
@@ -35388,7 +35473,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -35397,7 +35483,8 @@
"inputFields": null,
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -36800,7 +36887,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -38488,7 +38576,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "ENUM",
@@ -38625,7 +38714,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INTERFACE",
@@ -38698,7 +38788,8 @@
"__typename": ""
}
],
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "ENUM",
@@ -38807,7 +38898,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "ENUM",
@@ -38846,7 +38938,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "ENUM",
@@ -38906,7 +38999,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "ENUM",
@@ -39057,7 +39151,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -40291,7 +40386,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -41811,7 +41907,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "ENUM",
@@ -41948,7 +42045,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -42675,7 +42773,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -44417,7 +44516,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "ENUM",
@@ -44582,7 +44682,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -46636,7 +46737,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "ENUM",
@@ -46759,7 +46861,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "ENUM",
@@ -46812,7 +46915,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "ENUM",
@@ -46970,7 +47074,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -47707,7 +47812,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -49485,7 +49591,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "ENUM",
@@ -49636,7 +49743,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -50395,7 +50503,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -52749,7 +52858,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "ENUM",
@@ -52970,7 +53080,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -53715,7 +53826,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "INPUT_OBJECT",
@@ -56021,7 +56133,8 @@
],
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "ENUM",
@@ -56228,7 +56341,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -56258,12 +56372,13 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
"name": "__Directive",
- "description": "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL’s execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.",
+ "description": "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL\u2019s execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.",
"fields": [
{
"name": "name",
@@ -56417,7 +56532,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "ENUM",
@@ -56554,7 +56670,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -56631,7 +56748,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -56756,7 +56874,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -56833,7 +56952,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -56949,7 +57069,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "OBJECT",
@@ -57171,7 +57292,8 @@
"inputFields": null,
"interfaces": [],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "ENUM",
@@ -57238,7 +57360,8 @@
}
],
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -57247,7 +57370,8 @@
"inputFields": null,
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -57256,7 +57380,8 @@
"inputFields": null,
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -57265,7 +57390,8 @@
"inputFields": null,
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -57274,7 +57400,8 @@
"inputFields": null,
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
},
{
"kind": "SCALAR",
@@ -57283,7 +57410,8 @@
"inputFields": null,
"interfaces": null,
"possibleTypes": null,
- "__typename": ""
+ "__typename": "",
+ "isOneOf": false
}
],
"directives": [
@@ -57376,8 +57504,18 @@
],
"isRepeatable": false,
"__typename": ""
+ },
+ {
+ "name": "oneOf",
+ "description": "Marks an input object type so that exactly one of its fields must be supplied with a non-null value.",
+ "locations": [
+ "INPUT_OBJECT"
+ ],
+ "args": [],
+ "isRepeatable": false,
+ "__typename": "__Directive"
}
],
"__typename": ""
}
-}
\ No newline at end of file
+}
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/introspection/testdata/swapi_introspection_response.json b/app/v2/pkg/introspection/testdata/swapi_introspection_response.json
index 8475999..f162609 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/introspection/testdata/swapi_introspection_response.json
+++ b/app/v2/pkg/introspection/testdata/swapi_introspection_response.json
@@ -70,6 +70,16 @@
"defaultValue": "\"No longer supported\""
}
]
+ },
+ {
+ "name": "oneOf",
+ "description": "Marks an input object type so that exactly one of its fields must be supplied with a non-null value.",
+ "locations": [
+ "INPUT_OBJECT"
+ ],
+ "args": [],
+ "isRepeatable": false,
+ "__typename": "__Directive"
}
],
"mutationType": {
@@ -115,7 +125,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -150,7 +161,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -185,7 +197,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -220,7 +233,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -255,7 +269,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -290,7 +305,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -325,7 +341,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -360,7 +377,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -395,7 +413,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -554,7 +573,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -675,7 +695,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -1946,7 +1967,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -2017,7 +2039,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -2114,7 +2137,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -2391,7 +2415,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -2684,7 +2709,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -2887,7 +2913,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -3098,7 +3125,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -3323,7 +3351,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -3538,7 +3567,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -3701,7 +3731,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -3822,7 +3853,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -5011,7 +5043,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -5082,7 +5115,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -5375,7 +5409,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -5578,7 +5613,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -5789,7 +5825,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -6014,7 +6051,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -6229,7 +6267,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -6278,7 +6317,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -6317,7 +6357,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -10693,7 +10734,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -10892,7 +10934,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -11013,7 +11056,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -12082,7 +12126,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -12153,7 +12198,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -12430,7 +12476,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -12633,7 +12680,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -12844,7 +12892,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -13069,7 +13118,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -13284,7 +13334,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -13487,7 +13538,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -13608,7 +13660,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -14839,7 +14892,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -14910,7 +14964,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -15187,7 +15242,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -15460,7 +15516,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -15495,7 +15552,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -15530,7 +15588,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -15565,7 +15624,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -15600,7 +15660,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -15635,7 +15696,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -15670,7 +15732,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -15705,7 +15768,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -15740,7 +15804,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -15775,7 +15840,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -15986,7 +16052,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -16107,7 +16174,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -17362,7 +17430,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -17433,7 +17502,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -17710,7 +17780,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -18003,7 +18074,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -18234,7 +18306,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -18355,7 +18428,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -20030,7 +20104,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -20101,7 +20176,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -20378,7 +20454,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -20671,7 +20748,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -20843,7 +20921,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -20938,7 +21017,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -21221,7 +21301,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -21524,7 +21605,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -21737,7 +21819,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -21958,7 +22041,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -22193,7 +22277,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -22418,7 +22503,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -22637,7 +22723,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -22758,7 +22845,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -24397,7 +24485,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -24468,7 +24557,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -24745,7 +24835,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -25038,7 +25129,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -25067,7 +25159,8 @@
],
"fields": null,
"kind": "ENUM",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -25232,7 +25325,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -26539,7 +26633,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -26670,7 +26765,8 @@
],
"fields": null,
"kind": "ENUM",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -26680,7 +26776,8 @@
"enumValues": null,
"fields": null,
"kind": "SCALAR",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -27739,7 +27836,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -28964,7 +29062,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -29083,7 +29182,8 @@
],
"fields": null,
"kind": "ENUM",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -29146,7 +29246,8 @@
"name": "Vehicle",
"ofType": null
}
- ]
+ ],
+ "isOneOf": false
},
{
"inputFields": null,
@@ -29241,7 +29342,8 @@
],
"fields": null,
"kind": "ENUM",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -29276,7 +29378,8 @@
],
"fields": null,
"kind": "ENUM",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -29329,7 +29432,8 @@
],
"fields": null,
"kind": "ENUM",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -29460,7 +29564,8 @@
],
"fields": null,
"kind": "ENUM",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -30400,7 +30505,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -31505,7 +31611,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -31624,7 +31731,8 @@
],
"fields": null,
"kind": "ENUM",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -32189,7 +32297,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -33456,7 +33565,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -33599,7 +33709,8 @@
],
"fields": null,
"kind": "ENUM",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -35132,7 +35243,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -35239,7 +35351,8 @@
],
"fields": null,
"kind": "ENUM",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -35286,7 +35399,8 @@
],
"fields": null,
"kind": "ENUM",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -35423,7 +35537,8 @@
],
"fields": null,
"kind": "ENUM",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -35996,7 +36111,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -37287,7 +37403,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -37418,7 +37535,8 @@
],
"fields": null,
"kind": "ENUM",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -38011,7 +38129,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -39722,7 +39841,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -39913,7 +40033,8 @@
],
"fields": null,
"kind": "ENUM",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -40494,7 +40615,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": [
@@ -42169,7 +42291,8 @@
"enumValues": null,
"fields": null,
"kind": "INPUT_OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -42348,7 +42471,8 @@
],
"fields": null,
"kind": "ENUM",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -42375,12 +42499,13 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
"name": "__Directive",
- "description": "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL’s execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.",
+ "description": "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL\u2019s execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.",
"interfaces": [],
"enumValues": null,
"fields": [
@@ -42510,7 +42635,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -42629,7 +42755,8 @@
],
"fields": null,
"kind": "ENUM",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -42696,7 +42823,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -42803,7 +42931,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -42870,7 +42999,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -42969,7 +43099,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -43154,7 +43285,8 @@
}
],
"kind": "OBJECT",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -43213,7 +43345,8 @@
],
"fields": null,
"kind": "ENUM",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -43223,7 +43356,8 @@
"enumValues": null,
"fields": null,
"kind": "SCALAR",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -43233,7 +43367,8 @@
"enumValues": null,
"fields": null,
"kind": "SCALAR",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -43243,7 +43378,8 @@
"enumValues": null,
"fields": null,
"kind": "SCALAR",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -43253,7 +43389,8 @@
"enumValues": null,
"fields": null,
"kind": "SCALAR",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
},
{
"inputFields": null,
@@ -43263,8 +43400,9 @@
"enumValues": null,
"fields": null,
"kind": "SCALAR",
- "possibleTypes": null
+ "possibleTypes": null,
+ "isOneOf": false
}
]
}
-}
\ No newline at end of file
+}
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/middleware/operation_complexity/operation_complexity_test.go b/app/v2/pkg/middleware/operation_complexity/operation_complexity_test.go
index 256c2c7..766ee13 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/middleware/operation_complexity/operation_complexity_test.go
+++ b/app/v2/pkg/middleware/operation_complexity/operation_complexity_test.go
@@ -770,6 +770,7 @@ type __Type {
possibleTypes: [__Type!]
enumValues(includeDeprecated: Boolean = false): [__EnumValue!]
inputFields: [__InputValue!]
+ isOneOf: Boolean!
ofType: __Type
}
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/operationreport/externalerror.go b/app/v2/pkg/operationreport/externalerror.go
index 8de9805..5e02166 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/operationreport/externalerror.go
+++ b/app/v2/pkg/operationreport/externalerror.go
@@ -26,6 +26,11 @@ const (
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.`
+ OneOfFieldMustBeNullableErrMsg = `Field "%s.%s" must be nullable when "@oneOf" is applied.`
+ OneOfFieldMustNotHaveDefaultValueErrMsg = `Field "%s.%s" must not provide a default value when "@oneOf" is applied.`
+ OneOfDirectiveOnExtensionErrMsg = `Directive "@oneOf" cannot be declared on an input object type extension.`
+ OneOfSingleFieldErrMsg = `Exactly one key must be specified for OneOf input value "%s".`
+ OneOfFieldNonNullErrMsg = `Value for member field "%s" of OneOf input object "%s" must be non-null.`
)
type ExternalError struct {
@@ -198,6 +203,33 @@ func ErrUnknownFieldOfInputObject(objName, fieldName ast.ByteSlice, position pos
return err
}
+func ErrOneOfFieldMustBeNullable(fieldName, typeName ast.ByteSlice) (err ExternalError) {
+ err.Message = fmt.Sprintf(OneOfFieldMustBeNullableErrMsg, typeName, fieldName)
+ return err
+}
+
+func ErrOneOfFieldMustNotHaveDefaultValue(fieldName, typeName ast.ByteSlice) (err ExternalError) {
+ err.Message = fmt.Sprintf(OneOfFieldMustNotHaveDefaultValueErrMsg, typeName, fieldName)
+ return err
+}
+
+func ErrOneOfDirectiveOnInputObjectExtension(typeName ast.ByteSlice) (err ExternalError) {
+ err.Message = OneOfDirectiveOnExtensionErrMsg
+ return err
+}
+
+func ErrOneOfInputObjectSingleField(typeName ast.ByteSlice, position position.Position) (err ExternalError) {
+ err.Message = fmt.Sprintf(OneOfSingleFieldErrMsg, typeName)
+ err.Locations = LocationsFromPosition(position)
+ return err
+}
+
+func ErrOneOfInputObjectFieldMustBeNonNull(fieldName, typeName ast.ByteSlice, position position.Position) (err ExternalError) {
+ err.Message = fmt.Sprintf(OneOfFieldNonNullErrMsg, fieldName, typeName)
+ err.Locations = LocationsFromPosition(position)
+ return err
+}
+
func ErrDuplicatedFieldInputObject(fieldName ast.ByteSlice, first, duplicated position.Position) (err ExternalError) {
err.Message = fmt.Sprintf(DuplicatedFieldInputObjectErrMsg, fieldName)
@@ -305,8 +337,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 +353,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-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/variablesvalidation/variablesvalidation.go b/app/v2/pkg/variablesvalidation/variablesvalidation.go
index 70bb603..7c31def 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/variablesvalidation/variablesvalidation.go
+++ b/app/v2/pkg/variablesvalidation/variablesvalidation.go
@@ -325,6 +325,29 @@ 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) validateOneOfInputObjectValue(jsonValue *astjson.Value, typeName []byte) bool {
+ valueContent := string(jsonValue.MarshalTo(nil))
+ obj := jsonValue.GetObject()
+ if obj.Len() != 1 {
+ v.err = v.newInvalidVariableError(fmt.Sprintf(`%s; Exactly one key must be specified for OneOf input value "%s".`, v.invalidValueMessage(string(v.currentVariableName), valueContent), string(typeName)))
+ return false
+ }
+
+ var fieldName []byte
+ var fieldValue *astjson.Value
+ obj.Visit(func(name []byte, val *astjson.Value) {
+ fieldName = name
+ fieldValue = val
+ })
+
+ if fieldValue == nil || fieldValue.Type() == astjson.TypeNull {
+ v.err = v.newInvalidVariableError(fmt.Sprintf(`%s; Value for member field "%s" must be non-null.`, v.invalidValueMessage(string(v.currentVariableName), valueContent), string(fieldName)))
+ return false
+ }
+
+ return true
+}
+
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 {
@@ -415,6 +438,11 @@ func (v *variablesVisitor) traverseNamedTypeNode(jsonValue *astjson.Value, typeN
return
}
}
+ if v.definition.NodeHasDirectiveByNameString(fieldTypeDefinitionNode, ast.OneOfDirectiveName) {
+ if !v.validateOneOfInputObjectValue(jsonValue, typeName) {
+ return
+ }
+ }
case ast.NodeKindScalarTypeDefinition:
switch unsafebytes.BytesToString(typeName) {
case "String":
diff --git a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/variablesvalidation/variablesvalidation_test.go b/app/v2/pkg/variablesvalidation/variablesvalidation_test.go
index 754a247..52e4b0d 100644
--- a/tmp/agent-patch-flux-pr-1308.1-of-1.2026-03-05__17-48-26__gpt-5-1-codex-mini/app/v2/pkg/variablesvalidation/variablesvalidation_test.go
+++ b/app/v2/pkg/variablesvalidation/variablesvalidation_test.go
@@ -1491,6 +1491,39 @@ func TestVariablesValidation(t *testing.T) {
err := runTest(t, tc)
require.NoError(t, err)
})
+
+ t.Run("oneOf input object variables", func(t *testing.T) {
+ tc := testCase{
+ schema: `
+ input VariantInput @oneOf {
+ foo: String
+ bar: String
+ }
+ type Query {
+ variant(input: VariantInput!): String
+ }
+ `,
+ operation: `query Foo($input: VariantInput!) { variant(input: $input) }`,
+ variables: `{}`,
+ }
+ err := runTest(t, tc)
+ require.Error(t, err)
+ assert.Equal(t, `Variable "$input" got invalid value {}; Exactly one key must be specified for OneOf input value "VariantInput".`, err.Error())
+
+ tc.variables = `{"input":{"foo":"A","bar":"B"}}`
+ err = runTest(t, tc)
+ require.Error(t, err)
+ assert.Equal(t, `Variable "$input" got invalid value {"input":{"foo":"A","bar":"B"}}; Exactly one key must be specified for OneOf input value "VariantInput".`, err.Error())
+
+ tc.variables = `{"input":{"foo":null}}`
+ err = runTest(t, tc)
+ require.Error(t, err)
+ assert.Equal(t, `Variable "$input" got invalid value {"input":{"foo":null}}; Value for member field "foo" must be non-null.`, err.Error())
+
+ tc.variables = `{"input":{"foo":"A"}}`
+ err = runTest(t, tc)
+ require.NoError(t, err)
+ })
}
type testCase struct {