2

I am running sample app. I called mutation for createUser in graphcool. But i am getting error like below screenshot. here is my code

  this.props
      .createUser({
        variables: {
          email: this.state.email,
          password: this.state.password
        }
      })
      .then(({ data }) => {
        alert(JSON.stringify(data))
      })
      .catch(error => {
        alert('There is a problem ' + error)
      })

const CREATE_USER = gql`
  mutation createUser(authProvider:{email:{$email: String, $password: String}}) {
    createUser(email: $email, password: $password) {
      id
      email
      password
    }
  }
`
const RegisterData = compose(graphql(CREATE_USER, { name: 'createUser' }))(Register)

export default RegisterData

here is my screenshot: enter image description here

Harika
  • 1,081
  • 3
  • 14
  • 25

0 Answers0