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
231 stars 55 forks source link

Registration BUG #103

Closed stephenjason89 closed 4 years ago

stephenjason89 commented 4 years ago

Please make your registration.php resolve function include exception of directive before model save because it is giving error unknown directive field Thank you

public function resolve($rootValue, array $args, GraphQLContext $context = null, ResolveInfo $resolveInfo)
{
    $model = app(config('auth.providers.users.model'));
    $input = collect($args)->except(['password_confirmation','directive'])->toArray();
    $input['password'] = Hash::make($input['password']);
    $model->fill($input);
    $model->save();

... //the rest of the code }

joselfonseca commented 4 years ago

You can also make a PR. We have not encounter this issue and is probably faster to merge a PR than us trying to replicate it.

stephenjason89 commented 4 years ago

Thank you will do now.

stephenjason89 commented 4 years ago

While editing the fork i just realized the code was not there. I think it is fixed on the master branch 4.1.12 is not yet fixed

stephenjason89 commented 4 years ago

Yes i can confirm that the issue has been resolved on the master branch