the_bluescreen
10/01/2017, 4:04 PMeruby
10/01/2017, 4:12 PMthe_bluescreen
10/01/2017, 4:39 PMthe_bluescreen
10/01/2017, 4:40 PMthe_bluescreen
10/01/2017, 4:40 PMeruby
10/01/2017, 4:41 PMeruby
10/01/2017, 4:41 PMeruby
10/01/2017, 4:42 PMeruby
10/01/2017, 4:44 PMeruby
10/01/2017, 4:47 PMmutation CreateUserMutation(
# pass in variables
$name: String!
$email: String!
$password: String!
) {
createUser(
# user variables in the actual mutation as needed
name: $name
authProvider: { email: { email: $email, password: $password } }
) {
# specify what you need in the response body
id
}
# perform the sign in after creation, using the same variables (assumes that creation is successful)
signinUser(email: { email: $email, password: $password }) {
# this is what is returned from the signinUser mutation
token
user {
id
# here I could add email to have it be returned to the browser function
}
}
}
eruby
10/01/2017, 4:49 PMnilan
10/01/2017, 6:37 PMnilan
10/01/2017, 6:38 PMemail
grant thing as mentioned here: https://github.com/graphcool/modules/tree/master/authentication/facebook#add-the-email-permission
this is just one example how you can make it work.