const [addUser, {loading}] = useMutation(REGISTER_USER, { update(_, result){ console.log(result) props.history.push('/') }, onError(err){ console.log(err.graphQLErrors[0].extensions.exception.errors) setErrors(err.graphQLErrors[0].extensions.exception.errors) }, variables: values })
this is where we set the error property, right? Is it not setting it correctly? is there an updated way for graphql to set errors?
45 | name="username" 46 | type="text" 47 | value={values.username}
so I know 'errors' is undefined.
const [addUser, {loading}] = useMutation(REGISTER_USER, { update(_, result){ console.log(result) props.history.push('/') }, onError(err){ console.log(err.graphQLErrors[0].extensions.exception.errors) setErrors(err.graphQLErrors[0].extensions.exception.errors) }, variables: values })
this is where we set the error property, right? Is it not setting it correctly? is there an updated way for graphql to set errors?