-
Notifications
You must be signed in to change notification settings - Fork 182
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
Path to 0.5.0 #53
Comments
@syrusakbary We have been looking a lot into a parallel middleware in our app (on Python 2.7). I was planning on open sourcing them, but the one we currently use is a simple ThreadPool middleware (the gevent middleware turned out not to be compatible with our app because we use grpc). That has its own issues though because it actually is spinning off threads. So our latest approach would be to use Futures (grpc is also using futures), which has a nice backport to python 2.7: https://github.com/agronholm/pythonfutures as well with an additional package to make it then-able: https://github.com/dvdotsenko/python-future-then Apart from the fact that this would be neater for our app (so I will already be slightly more biased towards a futures solution), I also do think it is the more pythonic solution and more and more projects (like grpc) do actually implement the futures interface. So this would in my opinion, generally make it easier to integrate with the parallel middleware. Since this is something that we need in our app and it has been on our internal TODO, that might be something that I, or possibly one of my colleagues could tackle. But the earliest for me would be sometime towards end of next week. cc @alamaison |
I've ported a few more commits: Add to unit tests to ensure test accepts both edits of enter and leave: graphql/graphql-js@d2c005a Add test for parseLiteral on ComplexScalar: graphql/graphql-js@b3a5127 Extract completeListValue funciton from CompleteValue: graphql/graphql-js@ab77470 Nit: fix missing quote in error message: graphql/graphql-js@db0924a |
@Globegitter I think using futures is reasonable given the python context. If we could achieve it in a simple way with futures I think would be a good idea to use it instead of |
@sdcooke you did a great work! |
@Globegitter after researching and trying to implement using only futures I realized that everything would work great if we "promesify" the So we can have the nice approach of |
@syrusakbary That sounds like a quite good option. What exactly would 'promesifying' |
@Globegitter What I meant with promesifying Here is the related PR for Promises, if you want a take al look. And here is the code for each executor... you might find useful too! |
Thanks, that is amazing progress @syrusakbary! Also this might be part of fixing #41 but it seems in your PR to 0.4.14 you missed: graphql/graphql-js@3d27953 |
@Globegitter I skipped intentionally this as we already pass the originalError to the Maybe what is not as obvious and need to be improved is that this original error is in the |
@sdcooke any other port of the |
I haven't disappeared! Just not finding enough time to get to it right now. I'm currently battling against relay connections in graphene! |
All the changes are now in the |
Wow that's amazing progress. Great job @syrusakbary! :) |
This new |
Version
0.5.0
compatible with theGraphQL
Apr 2016 spec.Related Pull Requests: #54 #59
Features
GraphQLError
)graphql.core.*
tographql.*
Isolatepromise
package into own package in PyPIpypromise
Breaking changes
Improve the executor to be closer to the reference implementation:
Promise
instead ofDeferred
as it simplifies the implementation. Use parallel resolvers automatically as default behavior when available. Related PR: Use Promises in execute context #59Commit Checklist
Implement the commits from GraphQL-js:
The text was updated successfully, but these errors were encountered: