2016-11-09 74 views
1

当试图创建新的用户具有刚刚从Auth0请求接收的idToken中的createUser突变,我收到以下错误:400错误

{ 
    "data": null, 
    "errors": [{ 
    "message": "Variable '$input_0' expected value of type 'SignupUserInput!' but got: {\"authProvider\":{\"auth0\":{\"idToken\":\"__idToken_Recieved_From_auth0_request__"}},\"clientMutationId\":\"0\"}. Reason: [in field 'name'] Expected non-null value, found null. (line 1, column 29):\nmutation CreateUserMutation($input_0:SignupUserInput!) {\n        ^", 
    "locations": [{ 
     "line": 1, 
     "column": 29 
    }] 
    }] 
} 

任何建议?

回答

2

它看起来像你的用户模型都需要有一个名称字段。如果是这样的话,那么你还需要将它添加到突变。

+0

稀释是。非常感谢! – Tapjay