relay-tools / react-relay-network-modern

Relay Modern Network Layer with middlewares — cache, auth, retry, batch, logger, SSR
MIT License
327 stars 62 forks source link

Fix formatGraphQLErrors for persisted queries #119

Closed kesne closed 3 years ago

kesne commented 3 years ago

This seemingly was introduced in a9a036ff1a02f0be5e9fe9b667b1bf2ec6a2d2b8. Persisted queries do not have a query body, and therefore the queryLine.subtr later on fails.

To fix this, I only applied the error locations mapping when there are queryLines present.

nodkz commented 3 years ago

Thanks a lot! 👍

nodkz commented 3 years ago

:tada: This PR is included in version 5.0.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: