Skip to main content
4 of 4
added 12 characters in body
Jan Bluemink
  • 1.2k
  • 9
  • 19

The App_Config\Sitecore\Services.GraphQL\Sitecore.Services.GraphQL.Content.config is from the JSS package, no need the change there somethings.

It is about your GraphQL endpoint, In your end point your configer what you need. Or you can use a predefined config like the. /sitecore/api/GraphQL/defaults/content/schemaProviders/systemContent

In your react app or whatever framework you use, see the \sitecore\config\myreactapp.config. You can add the search, with this line:<query name="search" type="Sitecore.Services.GraphQL.Content.Queries.SearchQuery, Sitecore.Services.GraphQL.Content" /> Then your GraphQL endpoint looks like this:

<schema hint="list:AddSchemaProvider">
 …
    <queries hint="raw:AddQuery">
     <!-- enable querying on items via this API -->
     <query name="item" type="Sitecore.Services.GraphQL.Content.Queries.ItemQuery, Sitecore.Services.GraphQL.Content" />
     <query name="search" type="Sitecore.Services.GraphQL.Content.Queries.SearchQuery, Sitecore.Services.GraphQL.Content" />
   </queries>

So find the config file from your GrapQL endpoint and configure there the search:

If you use a copy of the example: Sitecore.Services.GraphQL.Content.Master.config.example for a GraphQL endpoint you see it is using:

 <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>

That is another option using a predefined set, and that set is what your found in the Sitecore.Services.GraphQL.Content.config see also caveats-with-jss-graphql-endpoint/

Jan Bluemink
  • 1.2k
  • 9
  • 19