Is there a hook for extending the mutation?
hejamartin opened this issue · 1 comments
Hi great People.
I have used the following hook,
add_action( 'graphql_user_object_mutation_update_additional_data', 'graphql_register_user_mutation', 10, 5 );
Which enables me to extend functionality of RegisterUserInput, CreateUserInput, UpdateUserInput
But I need a similar hook for your LoginUserInput
I want to add the time of when the user logged in.
I was using the wordpress specific action:
add_action( 'wp_login', function ( $user_login, $user ){…}, 10, 2);
But your Login method does not trigger that one, only if logging in through the "wp-admin". That is why I need to extend functionality.
Is it already possible?
I don't need to send an extra property in this case in the input. But I need the hook, so that I can process that a login has been made.
I can let my application make an extra after a succesful login, but it would be much prettier to set it already at he time of your login mutation.