aerogear / keycloak-connect-graphql

Add Keyloak Authentication and Authorization to your GraphQL server.
Apache License 2.0
155 stars 22 forks source link

Not working with graphql@^16.0.0 #137

Open buenaondalab opened 2 years ago

buenaondalab commented 2 years ago

Could not resolve dependency: peer graphql@"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" from keycloak-connect-graphql@0.7.0

wtrocki commented 2 years ago

You might use latest graphql. Package needs to be patched to support it.

buenaondalab commented 2 years ago

I installed the package with --force option. So far no issues.

dbateman commented 2 years ago

It seems to work fine with graphql@16.5.0 but of course npm isn't happy about it. Can we get a bump to include the latest graphql as a peer please?

wtrocki commented 2 years ago

I no longer actively use that library, but still maintain it. If you can test it with latest graphql-tools and graphql then we can update packages and examples

dbateman commented 2 years ago

What are you using as an alternative, if you are still using GraphQL and Keycloak together?

Kars-de-Jong commented 1 year ago

Any progress on this? It work fine for us with GraphQL 16..6.0, but I must add that we only use the "Access to token/user information in resolver context via context.kauth (for regular resolvers and subscriptions)" functionality.

dbateman commented 1 year ago

If anyone is tired of using --force or --legacy-peer-deps, I've forked this repo and published a refactored version that works with graphql ^16.0.0 and graphql-tools ^9.0.0. It also has a convenient directive transformer function to use the @hasRole et al directives out of the box with Apollo Server 3/4 or compatible graphql server implementations. You can find it at https://www.npmjs.com/package/@dbateman/keycloak-connect-graphql

wtrocki commented 1 year ago

@dbateman If you want to mantain package feel free to create PR updating readme to point to the fork