aerogear / keycloak-connect-graphql

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

fix: remove dependency on joi, use our own validation logic #18

Closed darahayes closed 5 years ago

darahayes commented 5 years ago

This just replaces the function that validates the args that goes into @hasRole(). Thankfully the existing tests helped me ensure the exact same behaviour was kept. I also added a couple of more tests too. joi is a really nice library but it is a heavyweight solution for such a small piece of validation.