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

GraphQL.js v16 support #1100

Closed
MichalLytek opened this issue Oct 30, 2021 · 76 comments
Closed

GraphQL.js v16 support #1100

MichalLytek opened this issue Oct 30, 2021 · 76 comments
Assignees
Labels
Enhancement 🆕 New feature or request Solved ✔️ The issue has been solved
Milestone

Comments

@MichalLytek
Copy link
Owner

Recently, v16 release of graphql-js has been published:
https://github.com/graphql/graphql-js/releases/tag/v16.0.0

It contains a lot of breaking changes, so TypeGraphQL needs to be upgraded in order to support it.

For now, please stick to the 15.x version as described in peer-depdencencies and what the runtime check says:

UnmetGraphQLPeerDependencyError: Looks like you use an incorrect version of the 'graphql' package: "16.0.0". Please ensure that you have installed a version that meets TypeGraphQL's requirement: "^15.3.0".

This thread will be updated with the investigation about that.
It won't happen soon, as all the other GraphQL ecosystem tools need to support v16 too.

@MichalLytek MichalLytek added the Enhancement 🆕 New feature or request label Oct 30, 2021
@MichalLytek MichalLytek self-assigned this Oct 30, 2021
Pl217 added a commit to UN-OCHA/hpc-api that referenced this issue Nov 9, 2021
New major version 16 is released few days ago, but
other dependencies aren't ready for the upgrade

By the words of a main maintainer of type-graphql package
that we use, support for GraphQL version 16 "won't happen soon,
as all the other GraphQL ecosystem tools need to support v16 too."
MichalLytek/type-graphql#1100
@glen-84
Copy link
Contributor

glen-84 commented Dec 11, 2021

Support for GQL v16:

TypeGraphQL dependencies:

✅ graphql-query-complexity
✅ graphql-subscriptions

TypeGraphQL devDependencies:

✅ @apollo/federation
✅ @apollo/gateway
✅ @graphql-modules/core (available via the graphql-modules package, I think)
✅ @graphql-modules/di (available via the graphql-modules package, I think)
➖ apollo-cache-control (DEPRECATED)
✅ apollo-server
✅ apollo-server-plugin-response-cache
❌ graphql-redis-subscriptions (davidyaha/graphql-redis-subscriptions#503)
✅ graphql-tag

Others:

❌ graphql-parse-resolve-info (graphile/graphile-engine#773)
✅ graphql-relay-js
✅ graphql-scalars
✅ graphql-upload

Am I missing anything?

@sachaw
Copy link

sachaw commented Jan 10, 2022

Are there any alternate packages that can be used in stead of graphql-parse-resolve-info? They really seem to be dragging there feet with v16 support.
type-graphql is the last of my packages still not supporting v16.

@glen-84
Copy link
Contributor

glen-84 commented Jan 10, 2022

The graphql-parse-resolve-info upgrade is blocked by graphql/graphql-js#2719, but it's not a dependency of type-graphql anyway.

@ostap1010

This comment has been minimized.

@capaj
Copy link
Contributor

capaj commented Jan 18, 2022

@MichalLytek would be nice to include this in version 1.2.0 or maybe in a major as 2.0.0.
I would be content with either of them, but I think there is at least one change that might be considered breaking by some people, so 2.0.0 would be ideal,

@renaldodev
Copy link

It's time to have support for GQL v16 it should be fine

@favna
Copy link

favna commented Jan 19, 2022

The graphql-parse-resolve-info upgrade is blocked by graphql/graphql-js#2719, but it's not a dependency of type-graphql anyway.

I agree it's not a dependency but at least to my knowledge there aren't any other (good?) packages out there which are v16 compatible that will let us know which fields were requested by the client. If I have missed any then please do list them, it would be good to have an alternatives list. For that it's worth, the way I use graphql-parse-resolve-info is like so: https://github.com/favware/graphql-pokemon/blob/main/src/utils/getRequestedFields.ts and as a parameter decorator in my resolvers.

Of course Michal has the final say in whether he wants to support v16 regardless of graphql-parse-resolve-info but the GraphQL issue that is blocking it seems pretty stale to me.

@MichalLytek
Copy link
Owner Author

@renaldodev It's not the time yet.
Tons of apollo deps yells about graphql-js version on npm install. You can only use --force and pray 😛

@sachaw
Copy link

sachaw commented Jan 20, 2022

Many of use are not using Apollo, hence this is not an issue for some of us

@glen-84
Copy link
Contributor

glen-84 commented Jan 22, 2022

Tons of apollo deps yells about graphql-js version on npm install. You can only use --force and pray 😛

@MichalLytek I'd like to track these, would you mind listing them?

popcorn245 added a commit to FireEnjin/SDK that referenced this issue Feb 9, 2022
@leorrodrigues

This comment was marked as spam.

@sachaw
Copy link

sachaw commented Mar 3, 2022

This is the blocking issue, seems the groundwork is done graphile/graphile-engine#764 (comment)

@capaj
Copy link
Contributor

capaj commented Mar 4, 2022

@sachaw how is that issue blocking this repo from adopting gql 16?
Postgraphile has nothing to do with type-graphql

@sachaw
Copy link

sachaw commented Mar 4, 2022

As far as I'm aware, this repo depends on: graphql-parse-resolve-info
Which is a part of the graphile-engine monorepo.
There has been no specific drive to get this module updated, but wider support for upgrading there entire framework with the aforementioned pr graphile/graphile-engine#764

@glen-84
Copy link
Contributor

glen-84 commented Mar 4, 2022

As far as I'm aware, this repo depends on: graphql-parse-resolve-info

Why do you think that?

@sachaw
Copy link

sachaw commented Mar 4, 2022

I haven't looked at the source, but is that now what you meant by your original comment? #1100 (comment)

I'd be happy if that weren't the case.

@glen-84
Copy link
Contributor

glen-84 commented Mar 4, 2022

That was just a list of GraphQL libraries that TypeGraphQL developers might use. TypeGraphQL itself only depends on graphql-query-complexity and graphql-subscriptions, but there are also quite a few dev dependencies that I haven't yet listed. I might update my comment to include those later.

Personally, I do use graphql-parse-resolve-info, but not everyone does.

Apologies for the confusion.

@capaj
Copy link
Contributor

capaj commented Mar 4, 2022

I am suprised it takes this long. Work on https://github.com/MichalLytek/type-graphql/tree/v16 is very close to being production ready IMHO. Not sure why it was not finalized since Jan 18.

@MichalLytek
Copy link
Owner Author

I was unable to run apollo federation examples because of apollo not supporting v16. Did they release a new version yet?

I will try to finish this v16 upgrade and the rest of v2.0 preparation when I have time (which I don't have currently 😞).

@tomasstrejcek
Copy link

in the meantime I have forked the project https://www.npmjs.com/package/type-graphql-v2-fork as the tech is great but it went unmaintained for too long and all my tries to help went nowhere 🤷

@Cry0nicS
Copy link

Cry0nicS commented Jul 15, 2022

@tomasstrejcek Michal just had a presentation last weekend at a conference in Poland about TGL. He also got new sponsors (myself included, but as a donor). I doubt he has any plans to abandon it.

Maybe it's possible to reach out to him as he might accept you as a contributor to the project. It would definitely be beneficial to the community.

@itpropro
Copy link

I think @Cry0nicS is right, we shouldn't divide our community, which is quite active here. I know it seems abandoned in some parts, but you are free to create PRs and sponsor the project to keep it alive. It's great to hear that @MichalLytek received new sponsors which will definitely help him concentrate more on TGL in the future :)

@EstebanBorai
Copy link

I am having the same problem(s). Would like to upgrade to fastify 4!

@MichalLytek what can we do to help you push out updates?

I second this! If theres something I can do to help please share.
It would be nice to have a milestone set with todos to work on, count on me for helping out!

Also I find this issue actually relevant, is it possible to pin it on top of other issues in the issues section?

Thanks so much for the hard work!

@itpropro
Copy link

@MichalLytek can you elaborate on how to contribute to make things go faster? I feel like it's the most asked question around here and there are many people out there loving type-graphql that can and want to help.

@daviddawson
Copy link

daviddawson commented Aug 17, 2022

For those interested, this WIP PR appears to be solving this - #1331

@killerdroid99
Copy link

type-graphql 1.1.1 ├── ✕ unmet peer graphql@^15.3.0: found 16.6.0 ├─┬ graphql-query-complexity 0.7.2 │ └── ✕ unmet peer graphql@"^0.13.0 || ^14.0.0 || ^15.0.0": found 16.6.0 └─┬ graphql-subscriptions 1.2.1 └── ✕ unmet peer graphql@"^0.10.5 || ^0.11.3 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0": found 16.6.0

still having these errors 😢

@flmuel
Copy link

flmuel commented Sep 22, 2022

Still working with fixed versions bc of this is kind of sad... e.g. in my setup with graphql 15.x, fastify 3.x, mercurius 8.x etc...

Hopefully the release will come soon!

@jessekrubin
Copy link

jessekrubin commented Oct 11, 2022 via email

@MichalLytek
Copy link
Owner Author

Hopefully the release will come soon!

I will try to publish the current state of work as a .beta-1 release under @next tag, so that everyone can try to use this not-yet-finished version 😉

@jessekrubin
Copy link

@MichalLytek much love!

@bombillazo
Copy link

How can we opt-in to test the package with GraphQL v16 support?

@carlocorradini
Copy link
Contributor

@bombillazo

Hopefully the release will come soon!

I will try to publish the current state of work as a .beta-1 release under @next tag, so that everyone can try to use this not-yet-finished version 😉

@MichalLytek
Copy link
Owner Author

You can now try v16 support by installing type-graphql@2.0.0-beta.1 (or type-graphql@next) 🚀

@jessekrubin
Copy link

@MichalLytek just curious if you know how the new beta will play with typegraphql-prisma?

@MichalLytek
Copy link
Owner Author

There's no breaking changes in TypeGraphQL API, so apart from warning about deps it should just work 😉

@ujwal-setlur
Copy link

I just upgraded to graphql v16 and type-graphql 2.0.0.-beta.1, and all my test cases passed :-)

@oxilor
Copy link

oxilor commented Oct 31, 2022

@MichalLytek Thanks a lot for supporting v16! 👍

@rafaell-lycan
Copy link

rafaell-lycan commented Nov 1, 2022

@MichalLytek thanks a lot for supporting V16, also there is the v17 coming in a few months which already has some breaking changes and deprecation mentions.

I'd keep an eye on those for possible backward compatibility 😉

@kxbin
Copy link

kxbin commented Nov 22, 2022

Thanks a lot, great work! 👍

@orefalo
Copy link

orefalo commented Nov 30, 2022

Just to confirm that it works great - thank you, glad to be a sponsor

sample code can be found here (updated to graphql 16):
https://github.com/orefalo/mikrorm-typegraphql-example

@bombillazo
Copy link

Any plan on merging this soon?

@ezrankayamba
Copy link

Thank you so much for supporting v16, now I can proceed to upgrade to appollo server 4

@MichalLytek
Copy link
Owner Author

#1331 has been merged 🚀 See #1418 for info about the new release 👀

@MichalLytek MichalLytek added the Solved ✔️ The issue has been solved label Feb 8, 2023
@MichalLytek MichalLytek added this to the 2.0 release milestone Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement 🆕 New feature or request Solved ✔️ The issue has been solved
Projects
None yet
Development

Successfully merging a pull request may close this issue.