You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,8 @@ You can find and compare releases at the [GitHub release page](https://github.co
9
9
10
10
## Unreleased
11
11
12
+
## v15.21.0
13
+
12
14
### Added
13
15
14
16
- Add support for `@oneOf` input object directive - enables "input unions" where exactly one field must be provided https://github.com/webonyx/graphql-php/pull/1715
| name |`string`|**Required.** Unique name of this object type within Schema |
43
-
| fields |`array` or `callable`|**Required**. An array describing object fields or callable returning such an array (see below). |
44
-
| description |`string`| Plain-text description of this type for clients (e.g. used by [GraphiQL](https://github.com/graphql/graphiql) for auto-generated documentation) |
45
-
| parseValue |`callable(array<string, mixed>): mixed`| Converts incoming values from their array representation to something else (e.g. a value object) |
| name |`string`|**Required.** Unique name of this object type within Schema |
43
+
| description |`string`| Plain-text description of this type for clients (e.g. used by [GraphiQL](https://github.com/graphql/graphiql) for auto-generated documentation) |
44
+
| isOneOf |`bool`| Indicates that an Input Object is a OneOf Input Object (and thus requires exactly one of its fields be provided). |
45
+
| parseValue |`callable(array<string, mixed>): mixed`| Converts incoming values from their array representation to something else (e.g. a value object) |
46
+
| fields |`iterable<FieldConfig>` or `callable(): iterable<FieldConfig>`|**Required**. An iterable describing object fields or callable returning such an iterable (see below). |
46
47
47
-
Every field is an array with following entries:
48
+
Every entry in `fields` is an array with following entries:
| name |`string`|**Required.** Name of the input field. When not set - inferred from **fields** array key |
52
-
| type |`Type`|**Required.** Instance of one of [Input Types](inputs.md) (**Scalar**, **Enum**, **InputObjectType** + any combination of those with **nonNull** and **listOf** modifiers) |
53
-
| description |`string`| Plain-text description of this input field for clients (e.g. used by [GraphiQL](https://github.com/graphql/graphiql) for auto-generated documentation) |
54
-
| defaultValue |`scalar`| Default value of this input field. Use the internal value if specifying a default for an **enum** type |
| name |`string`|**Required.** Name of the input field. When not set - inferred from **fields** array key |
53
+
| type |`Type`|**Required.** Instance of one of [Input Types](inputs.md) (**Scalar**, **Enum**, **InputObjectType** + any combination of those with **nonNull** and **listOf** modifiers) |
54
+
| defaultValue |`scalar`| Default value of this input field. Use the internal value if specifying a default for an **enum** type |
55
+
| description |`string`| Plain-text description of this input field for clients (e.g. used by [GraphiQL](https://github.com/graphql/graphiql) for auto-generated documentation) |
56
+
| deprecationReason |`string`| Plain-test reason for why this input field is deprecated. |
55
57
56
58
## Using Input Object Type
57
59
58
-
In the example above we defined our InputObjectType. Now let's use it in one of field arguments:
60
+
In the example above we defined our InputObjectType `StoryFiltersInput`.
Copy file name to clipboardExpand all lines: tests/Utils/SchemaPrinterTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1011,7 +1011,7 @@ public function testPrintIntrospectionSchema(): void
1011
1011
reason: String = "No longer supported"
1012
1012
) on FIELD_DEFINITION | ENUM_VALUE | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION
1013
1013
1014
-
"Indicates that an input object is a oneof input object and exactly one of the input fields must be specified."
1014
+
"Indicates that an Input Object is a OneOf Input Object (and thus requires exactly one of its fields be provided)."
1015
1015
directive @oneOf on INPUT_OBJECT
1016
1016
1017
1017
"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations."
0 commit comments