Closed
Description
What happened?
Description
I'm trying to query a GraphQL endpoint on a site running Craft 4.13.7 and I'd like to override the defaultSearchTermOptions in my query.
In Twig we can do this:
{% set entries = craft.entries()
.section('mySection')
.search({
query: 'salty dog',
subRight: false,
})
.all() %}
When I try to pass a similar query via GraphQL
search: [{query: "salty dog"}, {subRight: false}]
That returns the following error:
{
"errors": [
{
"message": "Field \"entries\" argument \"search\" requires type String, found [{query: \"salty dog\"}, {subRight: false}].",
"extensions": {
"category": "graphql"
},
"locations": [
{
"line": 35,
"column": 13
}
]
}
]
}
Thanks for taking a look!
Craft CMS version
4.13.7
PHP version
8.1
Operating system and version
No response
Database type and version
No response
Image driver and version
No response