@@ -99,6 +99,42 @@ input GalleryInput {
99
99
including Ruby , Java , JavaScript and .NET already ship `@oneOf ` as a stable
100
100
feature
101
101
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
+
102
138
## The bottom line
103
139
104
140
`@oneOf ` allows for more expressive , capable , and less overwhelming schemas ,
0 commit comments