How to set null to field in graphql? -


we use graphql on our project , use graphql-java 2.3.0 (we plan update not possible @ moment).

i'm trying perform such mutation:

  mutation {     update_user(        id:3,       type: null     ) {id}   } 

response:

{   "errors": [     {       "validationerrortype": "wrongtype",       "message": "validation error of type wrongtype: argument value enumvalue{name='null'} has wrong type",       "locations": [         {           "line": 5,           "column": 7         }       ],       "errortype": "validationerror"     }   ],   "data": null } 

null keyword relatively new addition graphql spec, , graphql-java version you're using doesn't yet have implemented. in fact, 3.0.0 still doesn't have it. soon-to-be-released 4.0 have support null keyword.
, reason treated enum because unquoted strings enums, null being exception. explained in this issue.


Comments

Popular posts from this blog

javascript - Create a stacked percentage column -

Optimising Firebase database by automatically overwriting data -

javascript - Angular UI-Grid customTemplate directive causing rows to load slowly/? -