I am trying to execute one search query from graph ql ui but I am getting the following error.
Unknown argument \"where\" on field \"search\" of type \"Query\"."
I am using the default out of the box end point /sitecore/api/graph/items/master Also the search schema is already there in the Sitecore.Services.GraphQL.Content.config file. In Sitecore.Services.GraphQL.Content.Master.config file the scema provider is mapped .
<schema hint="list:AddSchemaProvider">
<!-- defaults are defined in Sitecore.Services.GraphQL.Content.config -->
<content ref="/sitecore/api/GraphQL/defaults/content/schemaProviders/systemContent" param1="master" />
</schema>
So to me everything looks fine but still I am getting this error.
query DictionarySearch(
$rootItemId: String!
$language: String!
$templates: String!
$pageSize: Int = 10
$after: String
) {
search(
where: {
AND: [
{ name: "_path", value: $rootItemId, operator: CONTAINS }
{ name: "_language", value: $language }
{ name: "_templates", value: $templates, operator: CONTAINS }
]
}
first: $pageSize
after: $after
) {
total
pageInfo {
endCursor
hasNext
}
results {
key: field(name: "Key") {
value
}
phrase: field(name: "Phrase") {
value
}
}
}
}