无法设置属性' clientMutationId'未定义"错误

时间:2016-12-12 04:58:57

标签: graphql relayjs graphql-js

CREATE TABLE

输出字段永远不会被调用,不确定我是否以正确的方式进行调用,在从mutateAndGetPayload方法返回数据时不会调用resolve函数。

outputFields: {
    token: {
        type: GraphQLString,
        resolve: (token) => token
    }
},

2 个答案:

答案 0 :(得分:3)

我认为您需要从mutateAndGetPayload方法返回一些内容。这可能是一个承诺。尝试返回userprof.findOne。

答案 1 :(得分:2)

解决方案

let base = medicareNumber.substringWithRange(
    medicareNumber.startIndex...medicareNumber.index(
        medicareNumber.startIndex,
        offsetBy: matches[0].rangeAtIndex(1).length)
    )
)