-
Notifications
You must be signed in to change notification settings - Fork 347
Conversation
I wasn't sure if I needed to bump the doc package.json, so I can if that is necessary and then document it in the docs README |
Generated by 🚫 dangerJS |
With these changes, you could also add apollo-link/packages/apollo-link-error/src/index.ts Lines 29 to 35 in 03dfb41
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR, it looks great! I had one minor comment, but overall this is good to merge. 😎
|
||
``` | ||
git clone --recursive https://github.com/apollographql/react-docs.git | ||
cd react-docs | ||
git submodule init |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for cleaning up the docs workflow instructions!! 🎉
packages/apollo-link-http/README.md
Outdated
@@ -69,7 +69,48 @@ client.query({ | |||
}) | |||
``` | |||
|
|||
## Upgrading from `apollo-fetch` / `apollo-client` | |||
## Errors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we mention apollo-link-error
in this section as the official way to handle errors?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great thought!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great! A much clearer way of reporting errors! Thank you!
parseError.statusCode = response.status; | ||
|
||
throw parseError; | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exactly what I needed ^ ! thanks so much for these changes @evans
packages/apollo-link-http/README.md
Outdated
| GraphQL Error | `next` | `` | | ||
|
||
```js | ||
type ServerError = Error & { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer something less oriented towards Flow/TS users here - maybe some example error objects?
packages/apollo-link-http/README.md
Outdated
}; | ||
``` | ||
|
||
## Upgrading from `apollo-fetch` / `apollo-client` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think apollo-client
in this heading is a bit misleading - maybe createNetworkInterface
?
packages/apollo-link-http/README.md
Outdated
This list describes the different errors and what the response Observable calls: | ||
|
||
* Client parse errors: the request body is not-serializable due to circular references for example | ||
* Server parse errors: the response from the server cannot be parsed((response.json())[https://developer.mozilla.org/en-US/docs/Web/API/Body/json]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this link is mis-formatted - probably worthwhile to look at the deploy preview or run locally
03dfb41
to
c06fe47
Compare
@gpoitch That is an incredible thought! I added the alias in. @peggyrayzis @jbaxleyiii I'm happy with the state of things. Let me know if you see anything else that needs attention. |
Amazing!!! ty guys |
is there an ETA for this to get merged and released? |
We add the result to network and data errors along with documenting errors in the http link's README. This error documentation used to happen in Apollo Fetch and since we are no longer using it the behavior should be present here.
This modifies the error types in a backwards incompatible manner, removing the nullable fields from a client parse error.
The PR also adds a couple changes to the docs README to detail how to run them locally.