Hot answers tagged

9 votes

Error message "Make sure the GraphQL service is installed and available"

We also faced a similar issue so we added https:// in our instance name in user.json (\.sitecore\user.json) and then tried again and it worked for us. Make sure you have https:// in your instance, ...
Gaurav Agarwal's user avatar
8 votes
Accepted

Cannot query field "search" on type "Query"

From the looks of it, the configuration was not patched correctly. The /sitecore/api/graph/items/master/… is the default JSS endpoint which has search query enabled, while the default JSS project ...
Fredric Foo's user avatar
  • 1,000
7 votes
Accepted

Profiling Sitecore 9.1 JSS Server-Side-rendering node server

I have some code to offer to start the node process(es) with custom arguments, e.g. --prof. However, I'd first like to highlight the following bits of information about GraphQL and JSS that might ...
Adam Weber's user avatar
  • 2,265
7 votes
Accepted

Error in component using integrated GraphQL search query "Cannot read property search of undefined"

Find the schema configuration for the JSS app GraphQL endpoint in config files, and add the "search" query reference. <sitecore> <api> <GraphQL> <endpoints> ...
Anastasiya's user avatar
7 votes

GraphQL error: Query is too complex to execute

In the file "Sitecore.Services.GraphQL.config" located under path_to_sitecore_instance\App_Config\Sitecore\Services.GraphQL you can find these notes and config elements (at least in my ...
Peter Procházka's user avatar
7 votes
Accepted

Create / Update / Delete items in Sitecore via GraphQL

The systemContent schema provider built into Sitecore GraphQL does indeed provide mutations to createItem, updateItem, and deleteItem. The Sitecore-provided /sitecore/api/graph/items/master endpoint ...
nickwesselman's user avatar
6 votes
Accepted

Graphql image size

I found 2 solution for this issue and I ended using method 1 for the "hashed url" convenience. Method 1: Using rendered(fieldRendererParameters) query ($datasource: String){ item (path:$...
Fredric Foo's user avatar
  • 1,000
6 votes
Accepted

Sitecore Filtering by Field Value on Query of GraphQL

You can use an index search and filter whatever, Use somethings like this: { search( fieldsEqual:[{name:"title", value:"Sit*" }] rootItem:"/sitecore/content" ) { results { ...
Jan Bluemink's user avatar
  • 1,165
6 votes
Accepted

Error message "Make sure the GraphQL service is installed and available"

Make sure you've installed the Sitecore Management Services module. It's listed as a pre-req here: https://doc.sitecore.com/developers/100/developer-tools/en/install-sitecore-command-line-interface....
Rob Earlam's user avatar
6 votes
Accepted

'jss bootstrap' causes JavaScript heap out of memory error on graphql-let step

We had a similar issue. These Sitecore configs determine which templates are supported by GraphQL; these templates are then represented to the generated TypeScript. Configs: \App_Config\Sitecore\...
Dave Peet's user avatar
5 votes
Accepted

Cannot query field \"search\" on type \"Query\"

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 ...
Jan Bluemink's user avatar
  • 1,165
4 votes
Accepted

How do I query GraphQL using SPE?

You can use the below function to query a defined GraphQL endpoint. function Invoke-GraphRequest { param( [string]$query, [Sitecore.Data.Items.Item]$siteRoot, [string]$...
Bic's user avatar
  • 530
4 votes
Accepted

Integrated GraphQL is not working correctly with JSS with SXA

This is a problem that falls on the unfortunate spot in between SXA, JSS, and Sitecore Services Client. I know it doesn't help you to know that these are somewhat separate development teams inside ...
Mark Cassidy's user avatar
4 votes
Accepted

Integrated GraphQL is not executed in Experience Editor

Ok, having spent some time trying to figure out how this whole thing works in Sitecore, I can now say, that SXA-JSS does not support integrated GQL. The problem lies in the sxa-jss configuration for ...
VadimG's user avatar
  • 286
4 votes
Accepted

Sitecore, JSS and GraphQL: licensing question

You don't need a JSS license to use the Sitecore.Services.GraphQL package, which is essentially the "core" part of using GraphQL with Sitecore. So you are free to create your own schemas, extenders, ...
Adam Weber's user avatar
  • 2,265
4 votes
Accepted

How to get Standardvalues from Sitecore GraphQL

You can use this GraphQL query to get all Fields of an Item: query DemoQuery($contextItem: String!) { contextItem: item(path: $contextItem) { fields { name value } } } ...
Jan Bluemink's user avatar
  • 1,165
4 votes

Sitecore came up with GraphQL in 9.2, so internally does they use Sitecore API?

I want to make it clear that Sitecore did not invent or create GraphQL. GraphQL is a pre-existing standard: https://graphql.org/ The Sitecore GraphQL API is an implementation of that standard with ...
Jason St-Cyr's user avatar
  • 6,741
4 votes
Accepted

Sitecore.ContentSearch.Linq is adding backslash to all space characters in search query

I was not able to find the direct cause of this issue but I have found a possible solution. When using the Like function with the slop parameter Like<T>(this T value, string phraseComparison, ...
Nikola Kramaric's user avatar
4 votes
Accepted

New JSS app will not start: GraphQL requests to Dictionary and Layout services are not supported in disconnected mode

When you run this command npm init sitecore-jss react it ask some option one of them is How would you like to fetch Layout and Dictionary data? it have two types (GraphQL and Rest) as shown in below ...
Rishiraj Shekhawat's user avatar
4 votes

Multi Language not working in Sitecore headless

You would also need to configure the language on the frontend in the next.config.js file: i18n: { locales: ['en', 'da-DK'], }, Here is the official documentation: https://doc.sitecore.com/xp/en/...
Tamás Tárnok's user avatar
4 votes
Accepted

How do you authenticate the GraphQL endpoint in Postman?

You can authenticate by generating bearer token using postman as explain by Dan. http://www.dansolovay.com/2023/01/using-postman-to-authenticate-to-graphql.html one more alternative is you can set ...
Sumit Helaiya's user avatar
3 votes

Get the item from a ReferenceField type in Sitecore JSS based on Langauge version

A way to do this is to set the Sitecore Context Language to de-DE for the GraphQL query. Just add &sc_lang=de-DE to the querystring of the URL from the GraphQL endpoint. An now you can also remove ...
Jan Bluemink's user avatar
  • 1,165
3 votes
Accepted

Can you resolve a droplink to an item within a GraphQL?

Yes you can resolve a Sitecore Droplink to an Item in one query, a Droplink has a targetItem that is the way to access the fields of the reference in GraphQL. GraphQL Example: query getArticles($...
Jan Bluemink's user avatar
  • 1,165
3 votes

Sitecore graphql gui does not work over https

Sitecore GraphQL uses Web socket communication to enable "Subscriptions" in GraphQL. As you mentioned, with https hosting it tries to connect to websocket WS protocol which is non secure ...
Anandarup's user avatar
3 votes

GraphQL Filter on PageType

There is an includeTemplateIDs filtering option on children: topItem: item(path: $datasource) { children(includeTemplateIDs: "{C6F6A81A-F9C9-45D8-AF4E-3E818C470F53}") { name ...
KateButenko's user avatar
3 votes

Fetching Multiple Item Data using GraphQL

You can easily add extra items to a query. give them a unique name for example: { item1: item(path:"/sitecore") { id name } item2: item(path:"/sitecore/content") { id path ...
Jan Bluemink's user avatar
  • 1,165
3 votes
Accepted

How to query Specialized TreeList using GraphQL

Solved it by adding the mapping for Specialized TreeList in the graphql content config. Config Path: inetpub\wwwroot\sitename\Website\App_Config\Sitecore\Services.GraphQL\Sitecore.Services.GraphQL....
Ajit Singh's user avatar
3 votes

Getting "Authentication required" error when attempting to use systemService with Sitecore GraphQL

When using Sitecore Identity Service for login (default on Sitecore 9.1+), you must configure additional URLs for which Sitecore will apply authentication cookies. For this example, a configuration ...
nickwesselman's user avatar
3 votes
Accepted

What built-in/standard fields are available on the `search` GraphQL query?

Based on my review of the decompiled Sitecore.Services.GraphQL.EdgeSchema.Services.SearchService class (which is the service used by the Sitecore.Services.GraphQL.EdgeSchema.Queries.SearchQuery query ...
Dan Sinclair's user avatar
  • 5,335
3 votes
Accepted

How to get the modified date and time for item versions in Sitecore via Graphql query

You need to read the field __updated which will hold the value of the updated date of the item. Below is how your GraphQL will look like: { item(path: "/sitecore/Content/Home", language: &...
Hishaam Namooya's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible