-
-
Notifications
You must be signed in to change notification settings - Fork 349
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
GraphQLInteraction doesn't support named queries #235
Comments
Thanks @sh3pik, it makes sense to support this. Can you please show me exactly what you'd like the DSL to look like and also what you've tried? |
I expect to be able to do something like: new GraphQLInteraction()
.withOperation('HomeBookListing')
.withQuery('query HomeBookListing { getBooks { title } }') If I run it on the current version, I'll get the error Diff
--------------------------------------
Key: - is expected
+ is actual
Matching keys and values are not shown
{
"body": {
- "operationName": null
+ "operationName": "HomeBookListing"
}
}
Description of differences
--------------------------------------
* Expected nil but got "HomeBookListing" at $.body.operationName |
Thanks @sh3pik, having another look at the docs I think we are just being a little bit too strict on what the |
I've pushed out a new release with a fix (16df628), let us know how you go! |
The fix works perfectly! Thanks a lot for a quick response! |
You're welcome, thanks for the report!
…On Sun, Oct 28, 2018, 1:36 AM Tatiana Shepeleva ***@***.***> wrote:
The fix works perfectly! Thanks a lot for a quick response!
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#235 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADSjNWEzEyb50tMX-gHf7avDrrwIgS5ks5upG93gaJpZM4X65QR>
.
|
Apollo allows naming operations for a query or a mutation. It can be specified right after a keyword, e.g.
query
, and goes tooperationName
in the body of the requestExpected behaviour
I expect
.withOperation()
to work with named operations.Actual behaviour
.withOperation()
allows onlyquery
ormutation
:The text was updated successfully, but these errors were encountered: