Skip to content

Commit be2a8ed

Browse files
authored
Merge pull request #29 from MarkASwanson/master
Correctly get passed data in ResetPassword resolver
2 parents 01ecafe + 8495cbb commit be2a8ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/GraphQL/Mutations/ResetPassword.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public function resolve($rootValue, array $args, GraphQLContext $context = null,
2121
try {
2222
$args = collect($args);
2323
// get the data from eather args['data'] for BC or new way args['input']
24-
$data = $args->has('data') ? $args->get('data') : $args->has('input');
24+
$data = $args->has('data') ? $args->get('data') : collect($args)->except('directive')->toArray();
2525
$this->validate($data, $this->rules());
2626
} catch (ValidationException $e) {
2727
throw new GraphQLValidationException($e->errors(), "Input validation failed");
@@ -84,4 +84,4 @@ protected function resetPassword($user, $password)
8484
event(new PasswordReset($user));
8585

8686
}
87-
}
87+
}

0 commit comments

Comments
 (0)