React native 语法错误:应为$,找到名称“0”;authprovider“;
我正在运行示例应用程序。我在GraphTool中为createUser调用了变异。但我得到的错误如下截图。 这是我的密码React native 语法错误:应为$,找到名称“0”;authprovider“;,react-native,apollo-client,graphcool,React Native,Apollo Client,Graphcool,我正在运行示例应用程序。我在GraphTool中为createUser调用了变异。但我得到的错误如下截图。 这是我的密码 this.props .createUser({ variables: { email: this.state.email, password: this.state.password } }) .then(({ data }) => { al
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)
导出默认注册表数据
这是我的截图: