-
Notifications
You must be signed in to change notification settings - Fork 823
[WIP] Road to 2.0 #500
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
[WIP] Road to 2.0 #500
Conversation
This looks fantastic, we're currently running Graphene with a reasonable amount of traffic (100's queries per sec) site, and have noticed a significant amount (~50%) of CPU time / latency is spent doing query validation. When investigating fixes for this, persisted queries looks like the ideal scenario. Are there any plans to add persisted queries to 2.0? or alternatively provide a hook to bypass validation/parsing if we know the query comes from a trusted source. |
minor spelling and grammar changes UPGRADE-v2.0.md
@matclayton I think persisted queries is indeed quite a useful feature (and I think is a better strategy for saving time compared to bypass the validation step). At the moment I'm more inclined to have an example of persited queries backed into one of the integrations, such as After that might be useful to put some of the common abstractions back into graphene so people can create it's own "persisted queries" implementations easily. Thoughts? |
@syrusakbary That makes perfect sense and was sort of what I was expecting, I'd just forgotten the django specific code had been pulled out into a separate package. |
@syrusakbary Hello, I know that subscriptions are going to be implemented in graphene soon but i just want to share how I managed to get them working with channels.
|
what does ProductType represents?, or can you send my a link with the file, to see it better |
@AgentChris ProductType is the DjangoObjectType
|
this works, but when i use react-apollo, it doesn't seems to work |
@AgentChris are you spliting the link so that subscriptions get routed to ws? |
@AgentChris Oh, also you might want to look at the actual post data send by apollo, |
@AgentChris Im currently trying to get apollo to connect to my django implementation of subscriptions if you want to track my progress, I ran into an issue here |
Main goals for Graphene
2.0
:__init_subclass__
, and a polyfill implementation for Python 2).Test and provide feedback :)
You can start testing the features provided in this PR with
pip install "graphene>=2.0.dev"
.There are also available versions for each of the integrations:
pip install "graphene-django>=2.0.dev"
pip install "graphene-sqlalchemy>=2.0.dev"
pip install "graphene-gae>=2.0.dev"
Please read the Upgrade Guide if your project was using previous versions of Graphene.
https://github.com/graphql-python/graphene/blob/2.0/UPGRADE-v2.0.md
Breaking Change: Resolver API changed in 2.0
Things to do before merging:
ObjectType
implementationInterface
implementationInputObjectType
implementationUnion
implementationMutation
implementationScalar
implementationEnum
implementationClientIdMutation
implementationNode
implementationConnection
implementationObjectTypeMeta
)Decided for next version:
typing
).New usage for Python 3
Meta Options using class arguments
Meta options can be created directly from class arguments instead of creating a
Meta
class in the type:Discarded for 2.0
While having field inference from object annotations is quite useful, it needs more effort to have it working it properly with mypy static typing. Because of that, the following will not be approached in the initial release of Graphene 2.0, but later.
Type inference