-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement transaction subscriptions #782
Comments
@luizstacio are you aware of any ways to get our GraphQL codegen to generate a method that would let me subscribe to this subscription. I added this code to subscription statusChange($id: TransactionId!) {
statusChange(id: $id) {
__typename
}
} And this is the function it generated in statusChange(
variables: GqlStatusChangeSubscriptionVariables,
requestHeaders?: Dom.RequestInit['headers']
): Promise<GqlStatusChangeSubscription> {
return withWrapper(
(wrappedRequestHeaders) =>
client.request<GqlStatusChangeSubscription>(StatusChangeDocument, variables, {
...requestHeaders,
...wrappedRequestHeaders,
}),
'statusChange',
'subscription'
);
}, |
Merged
44 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, the
fuel-core
implements a solution to improve transaction status monitoring via GraphQL Subscriptions. This new approach enables us to improve the current "expanding backoff" approach onTransactionReponse.waitFor...
, where we query transactions on a timely basis before the status change to use subscriptions and avoid multiples request.Note: We could use two strategies,
expanding backoff
andsubscribe
, to work on config bases giving the option to developers to pass wich strategy to be used. The default should besubscribe
.The text was updated successfully, but these errors were encountered: