So the documentation is wrong in regards to mentioning the country in the example code? What about the created_at-field?
I tried @kyle_liu suggested search query from Get all customers with a specific tag in Admin API - #7 by kyle_liu, which does no longer throw a parsing error for the query but also does not return any customer which is not the expected result.
query {
customers(first: 1, query: "customer_tags CONTAINS 'ABC'") {
edges {
node {
id
displayName
firstName
}
}
}
}
I have a customer with a tag “ABC”, but the list returned is empty. Using the debug-parameter i get the following info about the search parsing.
"search": [{
"path": [
"customers"
],
"query": "customer_tags CONTAINS 'ABC'",
"parsed": {
"and": [{
"field": "default",
"match_all": "customer_tags CONTAINS"
}, {
"field": "default",
"match_phrase": "ABC"
}
]
}
}
]
To me this looks like it did not understand the query as expected and is searching the “default”-fields (What are the default fields???) for "customer_tags CONTAINS"
and "ABC"
.
I guess this circles back to my secondary question regarding a list of possible fields to use in the search querys. How does one know which fields are available and which are not?