Skip to content
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

Is there any way to use circuit breaker with resolver functions of graphql server? #706

Closed
ArchitectAK opened this issue Dec 14, 2022 · 3 comments

Comments

@ArchitectAK
Copy link

ArchitectAK commented Dec 14, 2022

Is there any way to use circuit breaker with resolver functions of graphql server?

TO be exact, I wanna apply circuit breaker on method of class resolver in type-graphql server.

@pavellishin
Copy link

Howdy! I'm working on something very similar right now at work, trying to use opossum for this.

@ArchitectAK
Copy link
Author

Hi,
I have solved the issue for me and have created PR to add example of how to use decorater for cirbuit brekaer and use it on graphql function (or any async function)
PR- nodeshift-starters/opossum-examples#420

@pavellishin
Copy link

How does this work? Our classes which implement the actual GraphQL resolvers don't last for the lifetime of the server - they get spun up per-request. I don't see any changes in that PR that would actually keep a timer running.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants