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

Don't require the key to match the query name #186

Merged
merged 1 commit into from
Feb 7, 2018
Merged

Don't require the key to match the query name #186

merged 1 commit into from
Feb 7, 2018

Conversation

dustinboss
Copy link

When running query, sometimes I want to set the results to a different data value than the name of the query. This works fine when using manual mode, however, an error is thrown that tell me that the key doesn't exist in the results.

In manual cases, I don't think an error should be thrown.

In "manual" mode, the user is setting the manually working with the value, so an error should not be thrown if the key isn't present in the response.
@halostatue
Copy link

This can be fixed query-side:

{
  foo: gql`query Foo {
    foo: bar { … } 
  }`
}

I had to do this recently.

@dustinboss
Copy link
Author

@halostatue - thanks. Yeah, there are workarounds, including using the update method in the Component. However, I still think that the error that's being output is not the intended code.

@Akryum Akryum merged commit 96570a1 into vuejs:next Feb 7, 2018
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

Successfully merging this pull request may close these issues.

3 participants