Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BulkAdd not working on SPA #59

Open
vsuaste opened this issue Jul 27, 2020 · 0 comments
Open

BulkAdd not working on SPA #59

vsuaste opened this issue Jul 27, 2020 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@vsuaste
Copy link
Contributor

vsuaste commented Jul 27, 2020

The query for bulk creating doesn't coincide with graphql API.
Bulk add returns a string, while in the SPA the query expects to receive an array of records, as in the older version of the schema.
Now if we try to use it, we'll receive the error:

GraphQLError: Field "bulkAddCuadranteCsv" must not have a selection since type "String!" has no subfields.
    at Object.Field (/usr/Sandbox/graphql-server/node_modules/graphql/validation/rules/ScalarLeafs.js:42:33)
    at Object.enter (/usr/Sandbox/graphql-server/node_modules/graphql/language/visitor.js:324:29)
    at Object.enter (/usr/Sandbox/graphql-server/node_modules/graphql/language/visitor.js:375:25)
    at visit (/usr/Sandbox/graphql-server/node_modules/graphql/language/visitor.js:242:26)
    at validate (/usr/Sandbox/graphql-server/node_modules/graphql/validation/validate.js:73:24)
    at /usr/Sandbox/graphql-server/node_modules/express-graphql/index.js:121:32
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
{"message":"Field \"bulkAddCuadranteCsv\" must not have a selection since type \"String!\" has no subfields.","locations":[{"line":1,"column":30}],"source":{"body":"mutation{ bulkAddCuadranteCsv{ cuadrante_id} }","name":"GraphQL request","locationOffset":{"line":1,"column":1}},"positions":[29]}

Fix this on SPA.

@vsuaste vsuaste added the bug Something isn't working label Jul 27, 2020
@vsuaste vsuaste self-assigned this Jul 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant