@@ -174,10 +174,21 @@ terms of achieving our goals, but have slightly different trade-offs:
174
174
2. enable `input ` to be used in output too , turning it into a `struct `
175
175
3. introduce a new `struct ` type
176
176
177
- I 've gone full circle on this , and am currently thinking that option 2 is our
178
- best bet . The main reason for this is that in the other scenarios `struct ` and
177
+ I 've gone full circle on this , and am currently thinking that option 1 is our
178
+ best bet .
179
+
180
+ Option 2 is tempting because in the other scenarios `struct ` and
179
181
`input ` will overlap significantly and it will be less than clear when to use
180
- one rather than the other .
182
+ one rather than the other . However , it suffers from some backwards -compatibility
183
+ concerns - namely that an input object being used on output is likely to confuse
184
+ existing tooling such as GraphiQL , and it 's entirely unknown to them whether an
185
+ input object should require a selection set or not .
186
+
187
+ Option 1 feels like it could be done in a more backwards -compatible manner since
188
+ the majority of existing tools and clients would not look at the `fields ` entry
189
+ on a scalar (so would not be confused by it) and already handle custom scalars
190
+ such as the `JSON ` scalar returning structured output , and can continue to omit
191
+ a selection set on this enhanced scalar , thus continuing to operate correctly .
181
192
182
193
**NOTE **: this syntax , these keywords , etc . are not set in stone . Discussion is
183
194
very welcome !
0 commit comments