-
Notifications
You must be signed in to change notification settings - Fork 185
Docs subscriptions #65
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
Conversation
@Cito Can you provide some feedback in this one? Thank you 😃 |
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.
You can put the tests that don't run in Python 2 in a separate directory like here.
Also, refactor the episode Enum to fit the spec.
Replace old mutation tests with a new one based on GraphQL spec examples.
39e69c0
to
2880319
Compare
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.
LGTM. Just two cosmetic issues.
Looks like mypy got mad about some definitions! |
I merge this anyway and will fix the mypy issues then. |
@KingDarBoja: Maybe you can make your next PRs and commits a bit more focused, i.e. better create more small PRs and commits than one large one, and keep the janitor work, cleanups etc. separate from the code changes and bug fixes. |
The mypy issues are fixed now in 2aeffa5. I simply silenced most warnings, some were caused by incomplete type hints in graphql-core 2. But we should not waste too much time with this. The typing stuff is much better in graphql-core 3 where we can also use real Python 3 type hints. |
Thanks for the suggestion, I will keep that on mind. Small PRs to address a specific bug fix or feature while cleanup and all those stuff on another PR.
I was going to ask at the Slack channel about spending some extra time (at least for me) to go around graphql-core-legacy and fix some issues to clean the repo from staled issues and pull requests due to development of graphql-core-3 being the current focus. Shall I do it or just ignore any related issue and instead wait for the gql-next migration plan? |
Some people are waiting for issues and PR in graphql-core-legacy to be processed. If you can help with that, this will be good. I simply do not have the time. |
Based on this graphene PR and reading about GraphQL sample schema, I tried to replicate the subscription feature using gql library.
There were big issues as this isn't well documented but this PR should provide insight for end users to use GraphQL subscriptions along with gql.
The only issue is that asyncio, async/await features are not supported on Python 2.7.
Also, the yield keyword will throw a
SyntaxError
on Python 3.5.Also, the
Episode
enumerable was using integers instead of strings values, so I replaced them to follow the sample GraphQL schema.For last, this PR also provides support for passing
GraphQLInputObjectType
andGraphQLInputObjectField
if using DSL based on #24.Cheers!