When we try to upload data to river model like this example: river_testdataMX.csv graphql-server shows the error:
GraphQLError: Unknown argument "country_ids" on field "validateRiverForCreation" of type "Query". Did you mean "addCountries"?
at Object.Argument (/usr/graphql-server/node_modules/graphql/validation/rules/KnownArgumentNames.js:60:29)
at Object.enter (/usr/graphql-server/node_modules/graphql/language/visitor.js:324:29)
at Object.enter (/usr/graphql-server/node_modules/graphql/language/visitor.js:375:25)
at visit (/usr/graphql-server/node_modules/graphql/language/visitor.js:242:26)
at validate (/usr/graphql-server/node_modules/graphql/validation/validate.js:73:24)
at /usr/graphql-server/node_modules/express-graphql/index.js:121:32
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
{"message":"Unknown argument \"country_ids\" on field \"validateRiverForCreation\" of type \"Query\". Did you mean \"addCountries\"?","locations":[{"line":6,"column":70}],"source":{"body":"{\nn1: validateRiverForCreation(river_id:\"51\",name:\"Acaponeta\",length:233,country_ids:[\"MX\"])\nn2: validateRiverForCreation(river_id:\"52\",name:\"Baluarte\",length:142,country_ids:[\"MX\"])\nn3: validateRiverForCreation(river_id:\"53\",name:\"Bravo\",country_ids:[\"MX\"])\nn4: validateRiverForCreation(river_id:\"54\",name:\"Candelaria\",length:150,country_ids:[\"MX\"])\nn5: validateRiverForCreation(river_id:\"55\",name:\"Cazones\",length:145,country_ids:[\"MX\"])\n}","name":"GraphQL request","locationOffset":{"line":1,"column":1}},"positions":[420]}
But if we upload data with NULL fields on country_ids like this example: river_testdataNULL.csv, we can upload it successfully.
When we try to upload data to river model like this example: river_testdataMX.csv graphql-server shows the error:
But if we upload data with
NULL
fields oncountry_ids
like this example: river_testdataNULL.csv, we can upload it successfully.