following up with this issue https://github.com/hasura/graphql-engine/issues/1170
How can I include variables in mutations when the field type in the database is an array?
GraphQL
mutation insert($words: String!){
insert_words(objects: {list: $words}) {
returning {
list
}
}
}
Query Variables
{
"words": "{hello, world}"
}
I get the following error:
Variable $words of type String! used in position expecting type _text
@chrisjaimes The error is pretty self-explanatory :smile: , change String! to _text!
@shahidhk thanks! :)
Most helpful comment
@chrisjaimes The error is pretty self-explanatory :smile: , change
String!to_text!