graphql-python / graphql-server

This is the core package for using GraphQL in a custom server easily
MIT License
120 stars 72 forks source link

New version using graphql-core-next instead of graphql-core #20

Closed Cito closed 1 year ago

Cito commented 5 years ago

We should create a version that uses graphql-core-next instead of graphql-core.

@norman-thomas has already created PR #17 for this and I have also created a private branch for this.

Since this is not fully backward compatible and needs Py 3.6+, this should be done starting with the new major version number 2.0. A branch for maintenance of version 1.x that will be backward compatible should be created from the current master.

But I think we should first discuss the version and naming strategy (graphql-python/graphql-core/issues/241) across projects because this affects serveral other projects, and do some clean-up and maintenance work before we create the new branch (ideally close all pending tickets first).

We should also notify the maintainers of the depending packages of this breaking upgrade.

fhennig commented 4 years ago

@Cito hey, is your branch still working? I had a look and in setup.py the dependency is graphql-core-next. I think by now the package `graphql-core with >=3 can be used.

I've made my own fork too (it's quite hacked together though at the moment), and I'd like to get a new version of this package out. I'm using a stack with flask-graphql and graphene, and we started looking at graphene v3 now.

In regards to versioning I think bumping to a new major version (because of the breaking changes) would make sense, maybe going straight to a version 3 so it's in line with graphql-core and graphene (both on v3 now). This way it doesn't break any of the upstream dependencies (flask-graphql, django-graphql etc) and those packages can upgrade at their own pace.

When I made the fork I also noticed the API changes, like the "backend" is not existing anymore. The closest equivalents are the "graphql_sync" and "graphql" versions in the new graphql-core, maybe switching between those could be exposed as a parameter instead.

Anyway I think it's important to get this out there, otherwise flask-graphql etc will not be able to upgrade at all! If there's anything I can do I'd like to help.

Edit: I just had a look at the Issue 241 you linked, I think the versioning stuff is resolved for the most part and we can move on from that with this repository.

Cito commented 4 years ago

Hi @fhenning.

Yes, my branch still uses core-next instead of core v3. The branch and the issue are outdated, core-next has become core v3 and the plan is now to release server-core v3 based on core v3. I just was too busy with day jobs and keeping core v3 up to date. I want to release a core v3.1 beta this week, (based on js v15) and then let's move this forward. It will be probably best to publish an alpha of server-core based on core v3.1 so you can give your feedback before the final release.

Yes, the backend does not exist any more, core v3 uses sync and async only. The backends were mainly necessary to support older Python versions in core v2. server-core uses the execute() function which can be called async or sync (if all resolvers are sync). So we don't need a separate API.

fhennig commented 4 years ago

Alright, sounds good! Thanks for you work! I'll gladly test the alpha in our codebase.

KingDarBoja commented 4 years ago

The migration to graphql-core v3 has been already done along with the integration of the four backends using this library.