Questions tagged [graphql]

GraphQL is an open-source data query and manipulation language for APIs, and a runtime for fulfilling queries with existing data. GraphQL was developed internally by Facebook. All questions related to GraphQL in Sitecore environment, should consider this tag.

Filter by
Sorted by
Tagged with
0 votes
0 answers
48 views

The GraphQL type name, defined in the ContentSchemaProvider schema provider, begins with a lower-case character. Types must be Pascal Cased

Environment: Sitecore 10.1.2 SCS Management Service package 5.1.25 While setting up the Sitecore Content Serialization, I am facing this issue as the Type Name is in smaller case, needs to be in ...
StanLee's user avatar
  • 41
0 votes
2 answers
112 views

Sitecore xm personalization rules - graphql, jss v18.1

Is it possible to create personalization rules for conditional rendering in Sitecore XM with JSS version 18.1? We currently use GraphQL to get the content. I want to personalize this content using ...
Marcel van Harten's user avatar
2 votes
1 answer
40 views

GraphQL - Internal links rendering as notfound in Rich text field Value

Posting this to help others with this issue, answer below Issue: We are using Sitecore 10.2 headless on Vercel. On our Edge environment, Rich Text fields that are returned by GraphQL are returning /...
Erica Stockwell-Alpert's user avatar
1 vote
1 answer
206 views

Getting error "Ensure that there is only one instance of "graphql" in the node_modules directory"

I am trying to create a Sitecore JSS app for Sitecore 10.3 with nextjs template. I keep getting the error below when I try Jss start command. I am trying to run this in disconnected mode with REST. My ...
Padmaja's user avatar
  • 11
1 vote
1 answer
179 views

Sitecore CMS gets slow and unusable when opening up grapgql UI [duplicate]

I have an existing Sitecore 10.3 instance running on my local with SXA. The requirement for me is to use GraphQL to query data from my existing SXA site. In order to do that, I installed a headless ...
Ashan's user avatar
  • 63
0 votes
0 answers
23 views

Persistent handling of request.credentials across page loads

I am using Sitecore 10.3 with SXA and Headless packages installed. I also have GraphQL installed. I am trying mutation after enabling the /items/master endpoint. But every time I have to change the ...
Harsh Mithapara's user avatar
1 vote
2 answers
276 views

GraphQL.ExecutionError: Schema is not configured for mutations

I am using Sitecore 10.3 SXA Headless and using NextJS Page Router for my Front-end. Basically, I want to create an item by using graphQL mutation method. I have followed this stackexchange issue and ...
hrupapara's user avatar
1 vote
1 answer
205 views

Sitecore serialization error : HTTP Error invoking GraphQL endpoint https://CM hostname/sitecore/api/management

I am trying to get started using Sitecore CLI on my Sitecore 10.1 project. I am using Sitecore CLI v5.2.113. When I try to run an info command, I get success so I am thinking my setup is okay. However,...
Eveready1153's user avatar
1 vote
0 answers
69 views

XM Cloud GraphQL CORs preflight endpoint configuration Issue

XM Cloud GraphQL CORs preflight endpoint configuration Issue I am trying to execute the GraphQL query from my application in localhost, but I am unable to get the results, although the query works on ...
Manoj's user avatar
  • 91
0 votes
1 answer
184 views

Invalid graphql endpoint, Verify that 'layoutServiceHost' property in 'scjssconfig.json' file or appropriate environment variable is set

I am a newbie here. I was editing the .env file for adding the graphQLEndpoints. But in between something broke and I got this error. This is the scjssconfig.json file { "sitecore": { ...
hrupapara's user avatar
0 votes
0 answers
129 views

Server Error TypeError: Cannot read properties of null (reading 'key') i18n/graphql-dictionary-service.js

I am running Sitecore 10 locally with Next.js The site works fine in Experience Editor but in normal mode i.e. http://localhost:3000/ I started getting this error below. Tried everything but in vain, ...
Zaheer Tariq's user avatar
2 votes
1 answer
108 views

Sitecore Search Index Sitecore Content using a Request Trigger and Experience Edge

I’m trying to index the Sitecore content with the following settings of the Sitecore search walkthrough https://doc.sitecore.com/search/en/developers/search-developer-guide/walkthrough–configuring-an-...
Gabriel Baldeon's user avatar
1 vote
1 answer
102 views

Sitemap Graphql query returns blank data

I am trying to fetch Sitemap in my NextJs app using GraphQLSitemapXmlService plugin. This is XM Cloud and I am using Preview API locally. During investigation, I realized that it is fetching response ...
Vikrant Punwatkar's user avatar
1 vote
0 answers
52 views

Headless SXA - Ensuring links are localized

We're developing a Language Switcher for our SXA NextJS app, I followed the documentation from NextJS on how to perform the switch and it works (switching from language A to language B) but what I ...
chrono.lala's user avatar
0 votes
1 answer
232 views

Error on push of sitecore CLI : Executed action can only be performed by Sitecore Administrators

I have sitecore instance on virtual machine, and I am trying to pull and push with my admin credentials only. But still receiving following error:
Jagmeet Kaur's user avatar
2 votes
1 answer
628 views

A rendering error occurred: Cannot read properties of undefined (reading 'attributes')

I have Setup the JSS application with Sitecore 10.3. When I am adding the components on page level its working fine but when I added them on partial design they are appearing fine there in experience ...
Vishal Khera's user avatar
2 votes
2 answers
349 views

ClientError: GraphQL.ExecutionError: Error trying to resolve rendered

Error while jss start:connected in sitecore jss next js sample app
Jagmeet Kaur's user avatar
0 votes
1 answer
157 views

Sitecore JSS nextjs | The requested document was not found [closed]

Sitecore jss nextjs sample app in connected mode. installation is done as per https://doc.sitecore.com/xp/en/developers/hd/200/sitecore-headless-development/walkthrough--creating-a-jss-next-js-...
Jagmeet Kaur's user avatar
0 votes
1 answer
261 views

Error: GraphQL Error (Code: 401): {"response":{"error":"Unauthorized","status":401 [closed]

I was installing sitecore jss wioth next js and added language en-US. for deploying app, I ran - jss deploy items --language=en-US --includeContent --includeDictionary any ideas to fix it?
Jagmeet Kaur's user avatar
0 votes
1 answer
104 views

Is SITECORE_API_KEY under XM Cloud App Environment variable is treated as X-API-Token for GraphQL?

Team, on XM Cloud i can see the environment variables like below.. Along with GRAPH_QL_ENDPOINT i am assuming, SITECORE_API_KEY is the key which we can pass with X-API-Token to validate. When i tried,...
Arvind Gehlot's user avatar
1 vote
3 answers
523 views

Sitecore GraphQL or condition

I am trying to get all the items in the certain folder based on 2 templates (Article, News) with the following GraphQL query. However i am facing to add the second template with "or" ...
Jey's user avatar
  • 323
0 votes
0 answers
69 views

JSS: Accessing the current SXA tenant and site name from a React API

I'm on Sitecore 10.2 so I don't have access to the new 10.3/XM Cloud functionality which accomplishes this out of the box. I've implemented a robots.txt handler for Headless SXA as per this article: ...
bowser724's user avatar
0 votes
0 answers
91 views

GraphQL: Disable suggestions in errors message

In case of a private API, we generally want to avoid leaking information about our API. Disabling the introspection is a good step, but the recommendations are leaking some information that can be ...
CoolName420's user avatar
0 votes
1 answer
391 views

GraphQL - Get item under settings

I have a headless SXA site and I was wondering if it’s possible to query an item under Settings via GraphQL. I think I should start with the query example here for getting the root item of a site but ...
Lala's user avatar
  • 377
0 votes
3 answers
533 views

How to obtain GraphQL access token on local XM Cloud

I want to use the GraphQL playground on my local instance of XM Cloud. The URL is https://xmcloudcm.localhost/sitecore/api/authoring/graphql/ide/. My understanding is that in order for this to work, ...
Marcel Gruber's user avatar
0 votes
1 answer
934 views

Provided SSC API Key is not valid

Likely a fringe case, but one that took a few days to track down. If you get the following error response from the GraphQL UI: "Error": "Response not Successful: Received Status Code ...
Mike Vincent's user avatar
5 votes
2 answers
672 views

Getting the url of the reference fields using Graph QL

I want to expose my Sitecore data to frontend using GraphQL edge queries. How do I get the url of the items selected in the multilist field? I tried using url keyword but getting the below error (see ...
Niti Chauhan's user avatar
2 votes
1 answer
242 views

Is there any difference between GraphQL on Experience Edge vs the XM / XM Cloud Edge Preview endpoints?

Is there any functional, behavioural, or schema differences between GraphQL on the Experience Edge API vs the Sitecore Platform XM or XM Cloud Edge Preview endpoint?
Mark Gibbons's user avatar
  • 5,432
4 votes
1 answer
670 views

How do you authenticate the GraphQL endpoint in Postman?

I am getting 403 "Authentication required." when i hit the GraphQL query in Postman. I am able to execute the same query in Sitecore GraphQL Playground. In postman, i am passing the URL as ...
Jey's user avatar
  • 323
2 votes
1 answer
242 views

Get Sitecore Items based on the dates by using graphql

I have a requirement to fetch the news items in between the fromDate and toDate. fromDate and toDate need to pass as a parameter so i am unable to forming the query. for your reference please find the ...
Saiprasad's user avatar
0 votes
1 answer
93 views

Experience Edge XM OAuth Credentials "Service not enabled within domain"

I am trying to generate JWT token by using the oAuh client credentials XM cloud. referring JWT for Experience Edge link. getting Service not enabled within domain: https://auth.sitecorecloud.io error ...
Arun's user avatar
  • 21
1 vote
1 answer
58 views

Graphql sending site data for another project environment

I have set up 2 projects on XM Cloud sandbox environment. Generating GraphQL EdgeToken from PS (.\New-EdgeToken.ps1 -EnvironmentId <environmentId>) for Project's (xmcloud-edge-integration) ...
Arun's user avatar
  • 21
1 vote
2 answers
109 views

How to remove Server HTTP Header from Sitecore GraphQL API response?

The Sitecore GraphQL API endpoint is returning Server HTTP Header in its response which has information on the hosting web server (IIS). This is a security issue as it gives the attacker information ...
rvsure's user avatar
  • 119
1 vote
1 answer
515 views

GraphQL queries take time to execute and failed with Errors

Sitecore instance running on Sitecore 10.3, JSS, nextjs with Graphql locally, I did enable graphql master endpoint to execute graphql queries. It was taking such a long time to execute simple queries ...
Sumit Helaiya's user avatar
1 vote
1 answer
93 views

GraphQL Mutation to update DropLink and MultiList field types

From what I'm reading these fields aren't supported? Create / Update / Delete items in Sitecore via GraphQL Is there a way to get this to work that someone's found anywhere? We Essentially just want ...
Dave Goosem's user avatar
2 votes
1 answer
255 views

Incorrect ItemSearchResults generated by "jss graphql:update" command Sitecore 10.2

Can anyone help me with this issue? Install NextJs app: npx create-sitecore-jss nextjs jss deploy config, jss setup , jss deploy app Install the Sitecore Headless Services package dotnet sitecore ...
dao duc's user avatar
  • 21
1 vote
1 answer
311 views

Sitecore JavaScript Rendering SDK (JSS) for Next.js. TypeError: Cannot destructure property 'datasource' of 'props.fields.data' as it is undefined

Issue: TypeError: Cannot destructure property 'datasource' of 'props.fields.data' as it is undefined. Sitecore Experience Platform 10.2 (Sitecore Installation Framework (SIF) PowerShell module) ...
Steve's user avatar
  • 11
1 vote
1 answer
561 views

How do you enable `/sitecore/api/graph/items/master` endpoint in sitecore jss nextjs

I have edge graphql endpoint enabled but I noticed that it doesn't do mutations, I'm trying to figure out how to enable the built in systemContent schema for my mutation requests. Edit I think it's ...
Carl Nierves's user avatar
0 votes
1 answer
877 views

How to pass query variables in graphql

I couldn't find a way to pass query variables to my graphql query, I've made a query which I think is how I'd be able to do mutation mutation UpdateItem($datasource: String!, $language: String!, $...
Carl Nierves's user avatar
3 votes
2 answers
306 views

Multi Language not working in Sitecore headless

We are using Sitecore 10.2 as headless (JSS) and nextjs for the front end. When we try to call JSS API it is working with multiple languages. https://{Sitecore}/sitecore/api/layout/render/jss/?item={...
Mahesh Patil's user avatar
1 vote
2 answers
2k views

Sitecore JSS GraphQL Search - Unknown argument where on field search of type Query

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 ...
Deb's user avatar
  • 121
2 votes
1 answer
407 views

Unable to fetch Image with server url in GraphQL

I am using Sitecore 10.2 in my local as headless and nextjs for frontend. I was trying experience editor, I was able to edit the components in experience editor. Now Images are not showing in Site ...
Mahesh Patil's user avatar
1 vote
3 answers
689 views

Sitecore JSS GraphQL CORS Error On Request

While running my react based JSS app, I am getting an exception related to CORS. Below is the request. I am passing the sc_apikey and in the API key item cors, origin and Allowed Controllers fields ...
Deb's user avatar
  • 121
1 vote
1 answer
114 views

JSS app not finding the layout after Headless Tenant creation when I deserialize items first

I'm using JSS Next with XM running into Docker and I'm getting a layout not found error, but I don't know where I can validate this. My scenario is the following, I've some serialized items and I know ...
Régner Aguiar's user avatar
1 vote
0 answers
83 views

Filter By Content Type using xm edge GraphQL endpoint

I am trying to use the search query to return all content which contains a specific keyword. But the response that I get also includes the media files along with the actual content(eg. articles). Is ...
harshil1507's user avatar
3 votes
2 answers
672 views

Need Rest API in Sitecore which can create, get, update , delete and publish items in sitecore without writing any code

Is there any Rest API in Sitecore which can create, get, update , delete and publish items in web instance and Solr without writing any code
Rohit Thakur's user avatar
0 votes
0 answers
479 views

ERROR: Duplicate "graphql" modules cannot be used at the same time when starting code-first NextJS JSS application

I'm trying to create a new code-first NextJS demo using the JSS initializer for experimental purposes only: However, running jss start always gives me this error: I believe this error is caused by ...
Thai Tran's user avatar
0 votes
0 answers
176 views

Get Updated and created date values in graph ql query using JSS react next js app

I am trying to fetch updated date of an item via graphql query using jss Sitecore app. I have done a bit of research and found out that I need to extend graphql schema in order to get updated date. ...
Adnan Raza's user avatar
2 votes
2 answers
565 views

GraphQL Component Query does not effect Layout Service response

Environment: Sitecore 10.2 XM Headless 20 SXA 10.2 SPE 6.3 Problem When I fill in the Component GraphQL Query field for a Json Rendering with something simple like this: query IntegrationQuery($...
Chet Cheeto's user avatar
2 votes
1 answer
788 views

GraphQL Search Query non-Edge

I'm using a non-edge GraphQL endpoint to leverage keyword search and faceting in my content search queries. This means that I'm using the Sitecore.Services.GraphQL.Content.Queries.SearchQuery class ...
Chet Cheeto's user avatar