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

Adding more descriptive logging for InvalidPayloadError #416

Open
iangbuck opened this issue Jun 21, 2019 · 3 comments
Open

Adding more descriptive logging for InvalidPayloadError #416

iangbuck opened this issue Jun 21, 2019 · 3 comments

Comments

@iangbuck
Copy link

Idea:

More descriptive error logging when encountering mismatch between query and fragments.

Screen Shot 2019-06-17 at 6 33 48 PM

This error came up when a query had not included an id value for a sub entity on a "shipment" entity, but the fragments did. In the repository I was working in shipment is the most common entity, so this error message was practically useless in tracking down the issue. Including the specific fragment / query name that triggered the error would greatly ease debugging.

@nevir
Copy link
Contributor

nevir commented Jun 21, 2019

Yeah :( The challenge around this one is that we can't realistically identify which queries touched a specific path in the cache without adding a ton of overhead; the query that gets the error may be triggeirng off a change made by one that ran many many queries in the past.

I think we may want to invest in getting #311 (comment) past the finish line (but it's been hard to make time for that)

@boorad
Copy link

boorad commented Jun 22, 2019

FYI, I recently updated versions of dependencies, including this project, and I now see InvalidPayloadError when I didn't before. So, I'm also interested in #311 (comment)

@boorad
Copy link

boorad commented Jun 25, 2019

Solved my issue by knowing payload and previousValue via console.log so this logging will be helpful.

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

3 participants