kkemple / graphql-auth

🔒 GraphQL authentication and authorization middleware
MIT License
278 stars 19 forks source link

withAuth without scope not working #1

Closed mitjade closed 7 years ago

mitjade commented 7 years ago

Im trying to integrate this package into an existing graphql express server.

users: withAuth((root, args, context) => { ... }),

gives me an error:

error { TypeError: Cannot read property 'length' of null
    at /.../node_modules/graphql-auth/index.js:42:8
   ...

If I call

users: withAuth([], (root, args, context) => { ... }),

It works ok.

kkemple commented 7 years ago

hey @mitjade, thanks for submitting, I will take a look and see what I can dig up

kkemple commented 7 years ago

a new version 0.0.4 has been pushed and this should be resolved now sorry for the delay!