Subgraph GraphQL Errors are being silently ignored #330
Comments
@iameli Interesting. Yeah, those errors should definitely be made available to components. Regarding those errors, as you're probably aware the subgraph doesn't yet index all the delegator fields the Explorer requires. For example, we can't yet index |
Awesome! Yeah, I briefly looked through the stitching pattern, seems reasonable. I'm wondering if this problem is maybe related to the way we compose several Apollo enhancers to set up the final props for the transcoder component and such — maybe an error-free Apollo context is clobbering the errors from this one. So far as I can tell we're doing the correct thing on the ApolloLink level by calling |
Not 100% sure, but there's an open apollographql issue that implies the errors are being swallowed because we're using schema stitching. |
Hmm possibly both of our suspicions — when I comment everything except for But if I uncomment them that error flashes up for a second and vanishes. Still diagnosing. |
As suggested on this unrelated bug, Unsatisfying. No idea what's going on... but that unblocks my immediate concern I suppose. |
Fixes #330 All the `notifyOnNetworkStatusChange: true` changes are necessary to get the "error" field of a graphQL query propagating all the way back to our component, unfortunately. See discussion here: livepeer/ui-kit#330 Also bumped all the Apollo versions. Didn't fix the problem but it also didn't introduce any so I kept the upgrade.
Fixes #330 All the `notifyOnNetworkStatusChange: true` changes are necessary to get the "error" field of a graphQL query propagating all the way back to our component, unfortunately. See discussion here: livepeer/ui-kit#330 Also bumped all the Apollo versions. Didn't fix the problem but it also didn't introduce any so I kept the upgrade.
Fixes #330 All the `notifyOnNetworkStatusChange: true` changes are necessary to get the "error" field of a graphQL query propagating all the way back to our component, unfortunately. See discussion here: livepeer/ui-kit#330 Also bumped all the Apollo versions. Didn't fix the problem but it also didn't introduce any so I kept the upgrade.
Fixes #330 All the `notifyOnNetworkStatusChange: true` changes are necessary to get the "error" field of a graphQL query propagating all the way back to our component, unfortunately. See discussion here: livepeer/ui-kit#330 Also bumped all the Apollo versions. Didn't fix the problem but it also didn't introduce any so I kept the upgrade.
Describe the bug (required)
Errors returned from the subgraph server aren't bubbling up to the components for some reason. When GraphQL sends us an
errors
field back it gets lost somewhere in the Apollo internals. We can see them in the Apollo client here if we log outvalue.errors
:but the client seems to completely lose track of them after that point. I can call
observer.error()
with them but that just makes it log out a "network error" and still nothing makes it to a component.Expected behavior (required)
Per the Apollo docs, I'd expect to see a
props.error
(or maybeprops.data.error
?) available to, for example, this enhancer function in the Explorer.To Reproduce (required)
Steps to reproduce the behavior:
explorer
with the environment variableREACT_APP_LIVEPEER_SUBGRAPH
set tohttps://api.thegraph.com/subgraphs/name/iameli/livepeerdev
The text was updated successfully, but these errors were encountered: