Stream payload "data" field #42
robrichard
announced in
Architectural Decision Records
Replies: 2 comments 4 replies
-
I basically always will prefer differently-behaving things having different names, so my preference is |
Beta Was this translation helpful? Give feedback.
4 replies
-
Seems like there is general agreement on renaming to Both the spec PR and graphql-js PR have been updated to reflect this. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Context
Raised by @IvanGoncharov:
Currently, our spec proposal defines a single payload object used for incremental delivery, with the properties
data
,errors
,label
,path
, &hasNext
.For
@defer
payloads,data
will always be an object or null type.For
@stream
payloads.data
will always be an array or null type (decided in #32).Should we instead define two discrete payload types, and modify the
@stream
payload to use a different field name (e.g.items
) instead ofdata
? This could potentially allow better static typing of the payload shapes.Decision
Based on below discussion, stream payload will use
items
instead ofdata
.Beta Was this translation helpful? Give feedback.
All reactions