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

writeResultToStore cannot create error when using graphql-tag webpack loader #1735

Closed
jacobk opened this issue May 24, 2017 · 3 comments
Closed

Comments

@jacobk
Copy link

jacobk commented May 24, 2017

Intended outcome:

Errors thrown in writeResultToStore should be propagated with relevant information added

Actual outcome:

Cannot ready property 'body' of undefined error is thrown instead

screen shot 2017-05-24 at 10 29 45

How to reproduce the issue:

Trigger writeResultToStore error when using graphql-tag webpack loaded queries.

Root cause:
screen shot 2017-05-24 at 10 29 11

Actual error thrown:
pasted image at 2017_05_24 10_31 am

@helfer
Copy link
Contributor

helfer commented May 24, 2017

Hi @jacobk can you send a PR to fix this? I think all you'd have to do is make sure we don't access an undefined field when putting together the error message.

@jacobk
Copy link
Author

jacobk commented May 24, 2017

@helfer the issue is fixed by apollographql/graphql-tag#65
I tried with [email protected] and it works like expected.

What's the formal constraints on what the query documents passed to apollo-client should look like?

I'll be happy to open a PR to simply not concat the source when not present if you think it makes sense.

@helfer
Copy link
Contributor

helfer commented Jun 1, 2017

Hi @jacobk thanks for helping with this! We fixed it in #1738 🙂

@helfer helfer closed this as completed Jun 1, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants