Label argument required on defer/stream directives #15
robrichard
announced in
Architectural Decision Records
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Context
Both the defer and stream directives support a
label
argument. This label should be used by GraphQL clients to identify the data from patch responses and associate it with the correct fragment. In the Facebook/Relay implementation, a label argument is required by the server schema. Relay is able to automatically generate unique labels, so it is not required for Relay developers to create their own label.Decision
The spec proposal makes the label argument optional. If provided, the GraphQL Server must add it to the payload.
Consequences
GraphQL clients that need the label argument to function correctly can either generate it or require that it is provided with client side validation.
Beta Was this translation helpful? Give feedback.
All reactions