Replies: 1 comment
-
You would just return an identifier and then poll over a query/mutation {
enqueueFoobar(input: $input) {
identifier
}
}
{
foobarStatus(identifier: $identifier) {
... on Running {
message
}
... on ErrorResult {
errors {
message
}
}
... on FooBarResult {
foobar {
result
}
}
} |
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
-
I have a whole suite of APIs that I am in the process of fronting with Hot Chocolate. A majority of these APIs use asynchronous request-reply pattern (API returns 202 ACCEPT + location) so that the consuming application does not have to wait for the response, but can either implement polling, or come back later using the provided location. NB: Some of the APIs are long-running.
How can a consuming application maintain the same pattern where a mutation may take a long time (hours maybe) and then come back to get the response.
Beta Was this translation helpful? Give feedback.
All reactions