aerogear / keycloak-connect-graphql

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

fix: Add cors to examples #67

Closed theguidingstar closed 4 years ago

theguidingstar commented 4 years ago

On taking clone, Running via your command in Read.me. I ran into an error with the import of KeyClockDef etc. I have updated that and now the application was running perfectly.. Import was

const { KeycloakContext, KeycloakTypeDefs, KeycloakSchemaDirectives } = require('../') Now changed to as per description const { KeycloakContext, KeycloakTypeDefs, KeycloakSchemaDirectives } = require('keycloak-connect-graphql')

Also added CORS dependency for CORS request.

darahayes commented 4 years ago

Hey there, thanks so much for your contribution and interest in the project. The idea with the examples is to use the version keycloak-connect-graphql that is already in the repo. That is why it uses require('../') This is an easy way for maintainers like me to do some manual end to end checks that the examples are still working when changes are made to the library.

Can you please share the error you saw before you made these changes? You might have gotten an error if the project was not built before you tried to run the examples. Did you try to run npm run compile in the root directory before running the examples?

theguidingstar commented 4 years ago

No, I didn't do. "npm run compile" before it. Can you mention that in your doc also so that people using can check out your project?

wtrocki commented 4 years ago

Thanks for the contribution. I will add info about the build that is required