aabreu
06/14/2017, 9:05 PMmutation {
createUser(authProvider: {
email: {
email: "<mailto:email@email.com|email@email.com>"
password: "secret-password"
}
}
name: "This Guy"
) {
id
name
}
}
How do I make this into a mutation that I can use in code?
eg, this way:
const addMutation = gql\`
mutation addPost($description: String!, $imageUrl: String!) {
createPost(description: $description, imageUrl: $imageUrl) {
id
description
imageUrl
}
}
\`
The Auth provider is confusing mekuldar
06/14/2017, 9:21 PMconst createUser = gql`
mutation (
$name: String!,
$email: String!,
$password: String!) {
createUser(
authProvider: {email: {email: $email, password: $password}}
name: $name) {
id
name
}
}
`
aabreu
06/14/2017, 9:26 PM