-
-
Notifications
You must be signed in to change notification settings - Fork 543
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
fix: export "getResponse" for batched GraphQL queries #1982
Conversation
@mattcosta7, may I ask your opinion on exporting the |
Oh nice, I like this. It does a nice job of encapsulating these operations and just returning the results! Makes sense to me! |
@mattcosta7, I have a few thoughts on that API:
|
Yeah that makes sense. As far as users should know just requests and responses exist and the rest is detail (maybe though, matching is also something transparent?) |
I'm thinking whether it'd make more sense to make |
I think my latest commit addressed all the issues I have with the function! It's now |
Released: v2.1.3 🎉This has been released in v2.1.3! Make sure to always update to the latest version ( Predictable release automation by @ossjs/release. |
Provides two integration test examples of how to intercept and mock a batched GraphQL query that's created by Apollo and batched-execute.
Roadmap
handleRequest
so it doesn't require tapping intoserver.emitter
andserver.resolvedOptions
internals.getResponse
is a good public API. Rename it toresolveResponse
? Usage-wise, it's good, just wondering about the naming.executeHandlers
. It's precisely what this function does.getResponse
signature to(handlers, request)
. No need for an object, its contract is unlikely to change (its intention is simple).getResponse
.fix
that getsgetResponse