-
Notifications
You must be signed in to change notification settings - Fork 863
Add value to Array field in mutation #267
Comments
Please see this proposal for our suggested implementation: https://github.com/graphcool/framework/issues/1275 This feature requires a fundamental change to the data structure for scalar lists, so it would be very valuable to get feedback on the suggested functionality as soon as possible, so we can make sure the new data structure supports all required features. |
Is this solved? link https://github.com/graphcool/framework/issues/1275 gives 404 Update. For further readers you can add value to array of relation in this way:
|
@gustawdaniel please help, I still face this problem, can I see your data model? and what your id look like //Here is my createRole mutation //Here is my createRoleInput //Here is what I'm sending from GraphQL Playground |
@onyegood It is because of you have array of ID in your model of input but you assigning this array to single Of course in your QraphQL Playground example everything should work. In backend code you can try
or
I assuming that you have
For next comments please use syntax with
to mark code. |
@gustawdaniel Much thanks, option 2 solved my problem. I am very grateful |
If you have a Type with a
[String!]
field, it might be useful to get a mutation syntax that supports adding to the existing Array.The text was updated successfully, but these errors were encountered: