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

Document difference from graphql-js #24

Closed
IvanGoncharov opened this issue Mar 3, 2019 · 7 comments
Closed

Document difference from graphql-js #24

IvanGoncharov opened this issue Mar 3, 2019 · 7 comments
Assignees
Labels
documentation Improvement of docs, docstrings etc.
Milestone

Comments

@IvanGoncharov
Copy link

@Cito You doing a great job keeping this lib in sync with graphql-js.
Also big thanks for taking the time to submit PRs back to graphql-js 👍

I was browsing the source code and notice that you already implemented middlewares:
https://github.com/graphql-python/graphql-core-next/blob/master/graphql/execution/middleware.py

Would be great to have a list of such changes so we can figure out is it something Python specific or we should push it into graphql-js.

I also interested if you added any new tests that we can mirror in graphql-js.

@Cito
Copy link
Member

Cito commented Mar 3, 2019

I was actually lagging behind and trying to catch up this weekend again. Still missing the last two months of changes...

My intention for graphql-core-next was to avoid differences and additions and keep everything as close to GraphQL.js as possible. Currently there are only two additions which have been taken over from the older graphql-core for backward compatibility reasons: support for middleware and a custom execution context. You're right, these should be mentioned particularly in the docs. I'll keep this open as a reminder.

I also try to keep the test suite in sync and send PRs when I notice problems or make additions. One user contributed a test_user_registry test/demo covering mutations and subscriptions, which I have added as a top level test to the test suite, similar to the star wars test/demo.

@Cito Cito self-assigned this Mar 3, 2019
@Cito Cito added the documentation Improvement of docs, docstrings etc. label Mar 3, 2019
@IvanGoncharov
Copy link
Author

IvanGoncharov commented Mar 3, 2019

@Cito Thanks for the details.

I think we need to have middlewares in graphql-js but at the moment I'm focused more on paying the technical debt for features we already have, e.g. buildSchema/extendSchema.

BTW. I notice you don't use contain_subset anymore so it looks like you can safely delete it:
https://github.com/graphql-python/graphql-core-next/search?q=contain_subset&unscoped_q=contain_subset

@Cito
Copy link
Member

Cito commented Mar 3, 2019

@IvanGoncharov Right, contain_subset is not needed any more after graphql/graphql-js@1d07ebf - removed it now.

@Cito
Copy link
Member

Cito commented Jun 30, 2019

Note to self: Document #41, #42 and overridable type_map_reducer.

@IvanGoncharov
Copy link
Author

@Cito A little bit off-topic but why do you need overridable type_map_reducer?

@Cito
Copy link
Member

Cito commented Jul 13, 2019

@IvanGoncharov This is to support Graphene, a higher-level and more Pythonic library wrapping GraphQL-core. Graphene uses a custom reducer to convert its own types to the GraphQL-core types. See here for how it is used by Graphene.

@Cito Cito added this to the v3.0 milestone Sep 14, 2019
@Cito
Copy link
Member

Cito commented Nov 30, 2019

The documentation has been added now in 2999def.

@Cito Cito closed this as completed Nov 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvement of docs, docstrings etc.
Projects
None yet
Development

No branches or pull requests

2 participants