Skip to content

Commit 89b99e5

Browse files
committed
Add comments and availability
1 parent ddb3138 commit 89b99e5

File tree

1 file changed

+36
-0
lines changed
  • src/pages/blog/2025-06-19-multioption-inputs-with-oneof

1 file changed

+36
-0
lines changed

src/pages/blog/2025-06-19-multioption-inputs-with-oneof/index.mdx

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,42 @@ input GalleryInput {
9999
including Ruby, Java, JavaScript and .NET already ship `@oneOf` as a stable
100100
feature
101101

102+
You might wonder why this is expressed as a directive in SDL rather than
103+
explicitly having a new type keyword; Brad Baker, contributor to GraphQL-Java,
104+
summed it up in [this comment back in
105+
2023](https://github.com/graphql/graphql-spec/pull/825#issuecomment-1659900665):
106+
107+
> use of the directive means that:
108+
>
109+
> - it's minimally invasive in terms of SDL tooling that might be out there,
110+
> - it's minimally invasive in terms of Introspection,
111+
> - it's minimally invasive in terms of engine implementation, it proved quite easy to implement in graphql-java.
112+
>
113+
> Great stuff!
114+
115+
Since then there have been a number of reports of success:
116+
117+
> I'm very happy with where this landed. We'd use it internally at my company. -- [Ethan Resnick](https://github.com/graphql/graphql-spec/pull/825#issuecomment-2128262620)
118+
119+
> More positive feedback: We are using it at HubSpot through the graphql-java implementation and look forward to it becoming standardized. -- [Henry Q. Dineen](https://github.com/graphql/graphql-spec/pull/825#issuecomment-2128324080)
120+
121+
> I implemented support for OneOf input objects for the Caliban GraphQL library (Scala) [...] it's been fairly straightforward implementing support for it and I couldn't really identify any areas that could have been improved. -- [kyri-petrou](https://github.com/kyri-petrou)
122+
123+
> We have been eagerly waiting at Jobber for this to land as well. [...] We have many use cases internally for it and we're very excited to see this land! -- [Clinton Pahl](https://github.com/graphql/graphql-spec/pull/825#issuecomment-2135724148)
124+
125+
> Colleagues at work (Atlassian) have been really happy with @oneOf, works exactly as you want it to and I haven't heard any negative feedback. -- [Donna Zhou](https://github.com/dondonz)
126+
127+
## Availability
128+
129+
`@oneOf` is already available in the following implementations of GraphQL:
130+
131+
- GraphQL.js v16+
132+
- GraphQL Ruby v2.0.21+
133+
- GraphQL.NET v8+
134+
- GraphQL Java v21.2+
135+
- HotChocolate v16.0.0+
136+
- Probably others!
137+
102138
## The bottom line
103139

104140
`@oneOf` allows for more expressive, capable, and less overwhelming schemas,

0 commit comments

Comments
 (0)