Closed kurt-o-sys closed 6 years ago
I have a graphql mutation query like this:
mutation update( $id: ID!, $description: String, $otherIds: [ID!]) { updateService( id: $id, description: $description, otherIds: $otherIds) { ...item }}
Running the query from the apollo in-browser graphiQL console, the mutation works fine. However, when I try to run it from my code, I get this error:
bundle.js:1 Uncaught (in promise) Error: GraphQL error: Variable '$otherIds' of type '[ID]' used in position expecting type '[ID!]'. (line 1, column xx): mutation update($id: ID!, $description: String, $otherIds: [ID]) { ^ (line 2, column xx): update(id: $id, description: $description, otherIds: $otherIds) {
So it seems this library changes graphql types of db references from [ID!] to [ID], making queries fail...
[ID!]
[ID]
@kurt-o-sys Thank you for reporting this. v0.1.5 is out with the fix.
v0.1.5
thx for the very quick fix :100:
I have a graphql mutation query like this:
Running the query from the apollo in-browser graphiQL console, the mutation works fine. However, when I try to run it from my code, I get this error:
So it seems this library changes graphql types of db references from
[ID!]
to[ID]
, making queries fail...