Skip to content

Conversation

Globegitter
Copy link

I added the original_error attribute as per graphql-js and now raising the GraphQLError with the previous stack as that what it seems the js code is intending.

I haven't tested yet if that works in the actual app so I am not entirely sure this will work given that we do this ctx.errors.append(e). In py3 it seems there is a __traceback__ on any Exception but not in py2. So I wouldn't even be sure how to best handle it cross-version otherwise.

Anyway, this is my first go at this implementation, might revise when I actually get to test it out etc.

@Globegitter
Copy link
Author

And also fix it for py3.

@syrusakbary
Copy link
Member

@Globegitter the next release of graphql-core will be 0.5.0. So any PR done in the master branch will be discarded until is rebased by the upcoming version, as there are a lot of changes and is not easy to port.

Also, I added better exception handling in the upcoming version, so probably this is not necessary.

Thanks anyway for your willing to improve the package!

@syrusakbary
Copy link
Member

@Globegitter oh! What I missed is renaming stack to original_error. If you wanna do it in a PR to the releases/0.5.0 would be great! If not I will do it after porting the GraphQL-js commits.

Thanks!

@syrusakbary syrusakbary mentioned this pull request Jun 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants