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
3 votes
2 answers
79 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
0 votes
0 answers
48 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. ...
0 votes
1 answer
70 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($...
2 votes
1 answer
125 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 ...
0 votes
0 answers
34 views

NextJS Getting Started template errors on first build

I'm running the JSS nextjs starter template, and for some reason, I'm running into an issue with the build when it begins to run graphql-codegen. Other post online suggests this could be a version ...
0 votes
0 answers
78 views

How to filter results by value in multiselect field?

I have many blog pages that are of type BlogArticlePage, all of these pages can have many "tags" selected through a MultiList field. In the JSS GraphQL Schema it looks like this: type ...
1 vote
0 answers
130 views

GraphQL search: How to query using a list of ids?

I have the following GraphQL statement. This GraphQL statement searches through our pages, filtering on a specific page type, and then filtering on if a specific droplink field contains either of two ...
  • 123
1 vote
1 answer
43 views

How to disable Mutation and Subscription in Sitecore GraphQL?

As per sitecore documentation, it states You can use custom authorization routines. Content endpoints can disable specific operations, so, for example, a mutation-free read-only content endpoint is ...
1 vote
0 answers
67 views

JSS NextJS GraphQL.d.ts code gen best practice

Sitecore NextJS sample generates the *.d.ts file. The size of this file is pretty big. It uses graphql-let behind the scene. https://github.com/Sitecore/jss/tree/release/19.0.0/samples/nextjs/src Keen ...
  • 2,253
1 vote
1 answer
53 views

What are different values for Allowed Controllers in System Services API key for GraphQL?

I'm working on Sitecore 10.0 graphQL and trying to secure the endpoint by enabling PublicService using Authentication and Sc_api key. While applying security hardening I came across allowed ...
0 votes
1 answer
92 views

JSS 18 + GraphQL playground configuration issues - A public action method 'ui' was not found on controller

I am trying to use GraphQL playground in the test environment using Sitecore 10.1 with JSS 18. It works like a charm on local with the same configuration (both local & test have Standalone role), ...
  • 77
3 votes
2 answers
236 views

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

I'm following along with Discover Sitecore's "Build Your First JSS App" video (https://www.youtube.com/watch?v=XNQGsr9_34A) and was only 2:10 in when I ran into my first issue. All I've done ...
  • 47
1 vote
1 answer
103 views

GraphQL Integrated not functioning correctly on CD server, working on CM

I'm having a problem on our site setup with Sitecore 10.2, Sitecore Headless Services 19.0 and SXA. GraphQL integrated isn't returning data correctly on our CD site, it is only working properly on the ...
  • 123
2 votes
1 answer
132 views

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

I have the Nextjs sample app running in connected mode to my existing Sitecore v10.2 implementation using JSS v19. It's all working correctly - I'm able to create new components and edit them in the ...
1 vote
1 answer
134 views

Graph QL Search Result Computed Field

I have started to look at using Graph QL for search using the endpoint that comes out the box with Sitecore 10.1. I've read that the results are based on an item but had lazy loading eg. You have ...
0 votes
2 answers
124 views

Sitecore GraphQL query - custom image prefix

Currently I have a GrahpQL query with bunch of images returning src as "/-/media" query: field(name:"Image"){ ...on ImageField{src} } Result: "Image": { "...
  • 67
3 votes
0 answers
154 views

Extend GraphQL schema for custom field

I'm working on a 10.2 solution with JSS & NextJS using the GraphQL (edge) endpoint. I already noticed this endpoint is sometimes quite different compared to others and now I would like to extend ...
  • 19.4k
0 votes
0 answers
175 views

Skip or exclude standard fields from GraphQL query results

Is there a way to exclude or skip standard fields from GraphQL query results. I'm sure this has been asked before but I couldn't find any helpful information.
1 vote
1 answer
180 views

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

I need the query to get date modified on item versions for an item. https://scnew9.3cm.dev.local//sitecore/api/graph/items/master/ui?sc_apikey={api-key}&query=query%0A%7B%0A%20%20item(path%3A%20%...
  • 327
1 vote
1 answer
76 views

GraphQL include multiple templates

How to include multiple templates in GraphQL? When I give something like below doesn't work. children(includeTemplateIDs: "{614C6C64-AD35-440E-9668-DF39D8A18CCG},{B094FD0E-D349-46C0-B829-...
  • 886
0 votes
0 answers
22 views

How to write and test Sitecore GraphQL Subscriptions Query?

I am trying to write Sitecore Subscription based GraphQL query according to mentioned at https://doc.sitecore.com/en/developers/101/sitecore-experience-manager/the-graphql-content-schema.html#...
1 vote
1 answer
69 views

Can we invoke Sitecore GraphQL as API using Postman

We have a requirement to get Sitecore items as invokable API using postman. Now postman is started supporting GraphQL. But when we try to invoke the Sitecore GraphQL I'm getting the error: URL: https:...
0 votes
1 answer
48 views

FieldEquals does not return results for certain fields

We have cases wherein Sitecore GraphQL - FieldEquals() method does not return results for certain fields.
3 votes
1 answer
97 views

Fields "children" conflict because they have different arguments

When trying to access the children of the different templates at the same level. We will be getting this error Fields "children" conflict because they have different arguments. Use different ...
1 vote
1 answer
115 views

How to apply a greater/less than DateTime query in Sitecore using the `IQueryable<ContentSearchResult>` Linq?

How do you apply a DateTime field comparison in Sitecore using the Sitecore.ContentSearch SDK? The ContentSearchResult[string key] function always returns a string which cannot be cast into a DateTime ...
3 votes
1 answer
216 views

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

I am trying to build a query that returns all items of a specific template, but can't seem to figure out if there's a "template" field available on the search query for GraphQL. Where can I ...
  • 5,115
0 votes
1 answer
266 views

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

I'm trying to use the example /sitecore/api/graph/items/master endpoint for Sitecore GraphQL, which uses the systemService security configuration. However when I visit /sitecore/api/graph/items/master/...
5 votes
2 answers
287 views

Create / Update / Delete items in Sitecore via GraphQL

The Sitecore Headless GraphQL documentation has some good examples for querying data. However I don't see any for mutations such as updating an item's fields, creating new items, or deleting items. As ...
  • 4,981
2 votes
1 answer
93 views

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

Whenever I query using the Like query the Sitecore generated Solr query escapes the space characters. Here is an example: queryable = queryable.Where(result => result["...
0 votes
1 answer
174 views

Get all content items with presentation from GraphQL Content Search API

Is there a way to get all content items with configured layout using GraphQL Content Search API? I noticed, type children(requirePresentation: true) consists of an argument for requirePresentation to ...
  • 135
2 votes
2 answers
761 views

GraphQL error: Query is too complex to execute

I am using JSS with Sitecore 10, and using the GraphQL search query, but I got this error after deploying to Sitecore: ERROR Error: GraphQL error: Query is too complex to execute. The field with the ...
2 votes
1 answer
184 views

Skip standard fields in GraphQL query results without strongly-typed items

Is there an easy way to return all fields, while skipping standard Sitecore fields in GraphQL query results without strongly-typed items? I know that I can use fields(ownFields:true), but it will ...
  • 606
1 vote
0 answers
122 views

Make sure the GraphQL service is installed and available (Sitecore 10 CLI) [duplicate]

When I try to use one of these commands dotnet sitecore ser push dotnet sitecore ser pull dotnet sitecore ser publish I got this error Make sure the GraphQL service is installed and available I ...
1 vote
0 answers
54 views

Is there a change in GraphQL Schema between JSS version 11 and 14?

I am currently using sitecore 9.0.2 and have installed JSS to query the data using graphQL queries. I use below features of JSS: Querying data using http://sitecore.local/sitecore/api/graph/items/...
-1 votes
1 answer
48 views

Does installing JSS package on sitecore modify database schema

I am planning to install JSS package on my sitecore instance to use GraphQL APIs. I want to know wether installing JSS package change/alter my database schema or solr indexes. In case I want to ...
2 votes
2 answers
220 views

How to query Specialized TreeList using GraphQL

I have an item in sitecore which has a field with Specialized Treelist selection. I want to query this field using GraphQL query. Query: { item(path: "{98414240-69F7-4768-9B22-FE8EF17BE984}&...
0 votes
2 answers
362 views

Image not working when fetching it with GraphQL in connected mode

This is on sitecore 10 / jss 14.0.1 I'm using JSS in connected mode (jss start:connected) since I will be fetching data with GraphQL. In my graphQL I fetch an image using this code: item(path: $item)...
  • 419
3 votes
5 answers
1k views

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

Installed fresh Sitecore 10 and trying to use Sitecore CLI combined with native Sitecore Content Serialization. When executing next command dotnet sitecore ser pull I get an error message Make sure ...
2 votes
1 answer
106 views

How do I query GraphQL using SPE?

How do I leverage SPE to query Solr via GraphQL?
  • 500
1 vote
1 answer
256 views

How to pass a variable to search context?

I have created a SearchContext, defined query, provider etc. I have a variable to pass so can get result depending on what is being passed. Now, how do I pass this $query variable (which will be a ...
  • 87
2 votes
1 answer
171 views

SitecoreJSS DateField is not able to format date coming from GraphQl query

I'm getting a Date from GraphQl query. When I get the result, it is coming as 20200415T123050Z. If I try to format using <DateField field={item.publishDate} render={(date) => date....
  • 87
1 vote
2 answers
532 views

GraphQL query to search for pages based on template

The following GraphQL query returns items based on the Page template: search(keyword: "Dream", first: 10, language: "en", fieldsEqual: [{name:"_templatename&...
2 votes
2 answers
688 views

Custom response for field and value from GraphQL query

While executing below GraphQL query using Sitecore Experience Graph Browser { item(path:"/sitecore/content/home") { name fields { name value } } } the response is as ...
4 votes
1 answer
1k views

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

My question is based on already asked question and can be found here Sitecore Filtering by Field Value on Query of GraphQL This question is marked as answered by @jan-bluemink but I am facing the ...
4 votes
1 answer
821 views

Integrated GraphQL is not working correctly with JSS with SXA

I've been struggling for a few days to get JSS Integrated GraphQL running on an existing SXA project. To rule out any issues being introduced by this project, I decided to go right back to square one, ...
  • 43
4 votes
2 answers
406 views

Integrated GraphQL is not executed in Experience Editor

We use Sitecore 9.2, SXA 1.9 + JSS 12.0. As for the JSS, we are using Sitecore First approach. Some JSON renderings have integrated GraphQL queries. The Jss site was created trough JSS Tenant/JSS ...
0 votes
1 answer
357 views

Manage security access for items with GraphQL

We noticed that there is no limitation on what data can be queried, all the data in GraphQL can be retrieved within the Sitecore instance. Any GraphQL request with the correct API Key can retrieve ...
1 vote
1 answer
323 views

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

I am working on a multi-lingual site where the data source has multiple language versions. I want to retrieve the items of multilist based on the language parameter passed. Sitecore GraphQL query: {...
0 votes
0 answers
199 views

Using Sitecore GraphQl in C# and send data to JSS

I am figuring out the Sitecore GraphQL Query where I need to use it as a query in my C# code (if that possible) where I just get all the items of a specific location in the Sitecore Tree. However, I ...
2 votes
1 answer
267 views

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

I have a template with a droplink "productarea". When I use a GraphQL to fetch this item, the value of the "productarea" is a GUID. This guid points to an item in the sitecore tree, and I need the ...
  • 419