joselfonseca / lighthouse-graphql-passport-auth

Add GraphQL mutations to get tokens from passport for https://lighthouse-php.com/
https://lighthouse-php-auth.com/
MIT License
228 stars 56 forks source link

No directive found for `middleware` #133

Closed Fitmavincent closed 3 years ago

Fitmavincent commented 3 years ago

After following the tutorial, and try to query and the error returns: No directive found for middleware. Is anything changes or missing some configs?

Fitmavincent commented 3 years ago

Oh, Jeez, tutorials are outdated

joselfonseca commented 3 years ago

Hi @Fitmavincent, it should not be outdated unless you are referring to something different to https://dev.to/joselfonseca/graphql-auth-with-passport-and-lighthouse-php-14g5 can you please tell me what lighthouse version you are using and what version of the package please?

joselfonseca commented 3 years ago

Wait, I just found it. It seems that I missed that part. Sorry about that. I am updating it right now.

joselfonseca commented 3 years ago

Updated it.

users: [User!]! @guard(with: ["api"]) @paginate(type: "paginator" model: "App\\User")