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

Expose type and error constructor for graphql response errors #312

Merged
merged 5 commits into from
Aug 27, 2021

Conversation

devversion
Copy link
Contributor

Exposes types and the error constructor for the error being
thrown when a GraphQL response contains errors. This allows
consumers to easily distinguish between unrelated errors vs.
graphql related errors, and allows for type-guarded access of
the response data / response headers.

Fixes #311

Exposes types and the error constructor for the error being
thrown when a GraphQL response contains errors. This allows
consumers to easily distinguish between unrelated errors vs.
graphql related errors, and allows for type-guarded access of
the response data / response headers.
@ghost ghost added this to Inbox in JS Aug 27, 2021
@gr2m gr2m added Type: Feature New feature or request typescript Relevant to TypeScript users only labels Aug 27, 2021
@ghost ghost moved this from Inbox to Features in JS Aug 27, 2021
@gr2m
Copy link
Contributor

gr2m commented Aug 27, 2021

can you check the remaining errors? Do the tests pass for you locally?

@devversion
Copy link
Contributor Author

@gr2m yeah, working on it. thx for the heads up. I'm guilty of not running the tests locally 😅🧐

@gr2m
Copy link
Contributor

gr2m commented Aug 27, 2021

you can also run npm run lint:fix to make the prettier linter happy and to keep the code formatting consistent with the rest. I hope to remove the necessity for that in future and just auto-format code pushed to the default branch, but for the time being we gotta bow to the rule of the prettier overlord

@devversion
Copy link
Contributor Author

@gr2m Done. I had to step away for a little bit. Fixed lint, fixed coverage drop due to the new export. Should be good for another pass. thanks

Copy link
Contributor

@gr2m gr2m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great PR, thanks a lot 💐

@gr2m gr2m merged commit b54bea0 into octokit:master Aug 27, 2021
JS automation moved this from Features to Done Aug 27, 2021
@github-actions
Copy link

🎉 This PR is included in version 4.7.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature New feature or request typescript Relevant to TypeScript users only
Projects
No open projects
JS
  
Done
Development

Successfully merging this pull request may close these issues.

Expose types for GraphQL request errors
2 participants