Consider allowing clients to set response priority with @defer(order: Int)
.
#44
theengineear
started this conversation in
General
Replies: 2 comments 1 reply
-
@theengineear thanks for your feedback. I think this is a good candidate for something that could be proposed after the initial |
Beta Was this translation helpful? Give feedback.
1 reply
-
If we allow a nested deferred fragment to defer relative to fields in the current fragment, we get fragment ordering without the need for "absolute" arguments. See #43 |
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
-
Has this forum considered allowing the client to specify an
order
? It would guarantee that data fororder: N
not be returned before data fororder: M
. The spec appears to leave prioritization up to the server. I think this control structure may be backwards.I really want to emphasize the “for desired UX” comments in the above snippet. I believe that the client is really the only entity which can truly know the right thing to do.
Disclaimers & Qualifications
This is a cross-post from graphql/graphql-wg#1077. I perused Enforcing delivery order of payloads and while I think those specifications make sense, I think they may not go quite far enough to enable clients.
I think it could be argued that via the
label
, a client could write custom code to manage this in the front-end — I’m suggesting that we should encode this in the server-side code (versus requiring that clients encode it themselves).Please note that I haven't considered how this might interoperate with the
@stream
directive. I've also not considered validity checking on nested@defer
or@stream
directives — I'm just hoping to raise a potential concern about the core control structure here.❤️ — Thanks very much for taking the time to read this. Apologies for any / all naivety and apologies if this has been covered (my initial searches didn't turn anything up).
Beta Was this translation helpful? Give feedback.
All reactions