Include an indication of upcoming payloads in response #66
robrichard
announced in
Architectural Decision Records
Replies: 1 comment
-
This has been addressed by the new response format described in #69 The new response format contains "pending" which clients can use to determine if a defer is ignored/inlined by the server. |
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
Taken from #52 (comment)
Since we allow servers to ignore defer/stream (meaning the results are inlined) there needs to be a way for clients to understand if a payload is being prepared, or was included in a prior response.
Proposed solution
pending
list of objects to responses would allow clients to know they can expect an upcoming payload at the specified path. If a pending object is not sent, clients can assume the results were included in prior response.complete: true
**Example A: Defer inside of stream
Although the incremental payloads for defer and stream have the same path, they are not ambiguous because the defer payload contains
data
and the stream payload containsitems
.Example B: Stream inside of defer,
Beta Was this translation helpful? Give feedback.
All reactions