When the user logs in and the following query comes back null:
query QueryName {
currentUser {
id
name
}
}
Then the user should be redirected to fill in email and handle by using the following mutation to update the data:
mutation ($user: UserInput!){
updateUser(user: $user) {
id
success
message
}
}
Update the User Profile page with a form to update/create a username(handle). That form will use the mutation above to update the users information in the database.
When the user logs in and the following query comes back null: query QueryName { currentUser { id name } }
Then the user should be redirected to fill in email and handle by using the following mutation to update the data: mutation ($user: UserInput!){ updateUser(user: $user) { id success message } }
Variable: "user": { "email": "emailaddress", "name": "handle" }