Mutation with complex field types #1648
Replies: 1 comment 1 reply
-
|
Hey @robertionut95b ! I think the issue may be with your operation input itself, not with the implementation details on the server, i.e not DGS framework related. Looks like there's an issue with converting the input argument
Try something like this instead: Please note you did not provide the schema definition of Specialization type, so I assume it contains a String, but you may need to modify. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I have the following scenario where I want to push a Mutation with the following types:
Input used
Mutation
I try to submit a sample request with the body below:
{ "query": "\n mutation CreateOrUpdateOrganization($OrganizationInput: OrganizationInput!) {\n createOrUpdateOrganization(OrganizationInput: $OrganizationInput) {\n name\n description\n }\n}\n ", "variables": { "OrganizationInput": { "id": 1, "name": "Paxton", "description": "Paxton is the perfect place to find your dream career. With our easy-to-use platform, you can search for jobs based on your skills and experience. We also have a wide range of resources to help you prepare for your job search. So what are you waiting for? Start your job search today", "slogan": "Find your perfect career with Paxton.", "activitySectorId": 1, "headQuartersId": 2, "companySize": "BETWEEN_1_5", "foundedAt": "2022-10-01", "webSite": "...", "specializations": [ "IT_and_Software", "AI", "Software_Development", "Software_Product_Design", "Project_Management" ], "locations": [ 2, 3 ], "photography": "...." } }, "operationName": "CreateOrUpdateOrganization" }How should the nested complex types like numeric arrays be included in an Input argument? On the server side, I get the following error but I am uncertain what is the conflicting field specifically:
The mutation resolver method is just:
Beta Was this translation helpful? Give feedback.
All reactions