Hello,
i am running the example for the customers query from the docs and can’t seem to get the search query to work.
This is the query im running at the moment:
query {
customers(first: 1, query: "country:canada") {
edges {
node {
id
displayName
firstName
lastName
}
}
}
}
The query returns a customer as a result (which it shouldnt, because there are no canadian customers) and the following error regarding the search query.
"search": [{
"path": [
"customers"
],
"query": "country:canada",
"parsed": {
"field": "country",
"match_all": "canada"
},
"warnings": [{
"field": "country",
"message": "Invalid search field for this query."
}
]
}
]
The same thing happens with a bunch of different search query i’d expect to work.
"search": [
{
"path": [
"customers"
],
"query": "created_at:>'2020-10-21T23:39:20Z'",
"parsed": {
"field": "created_at",
"range_gt": "2020-10-21T23:39:20Z"
},
"warnings": [
{
"field": "created_at",
"message": "Invalid search field for this query."
}
]
}
]
I’m a bit puzzled by the Invalid serach field for this query-error and can’t get any search query to work. Can someone please tell me what i’m doing wrong?
And another general question: Where do i find an list of the available search fields for a given resource? I found some fields through the search-syntax doc, but no exhaustive list. Especially for the resource-specific search fields, which presumably exist.