Mastering Sitecore and GraphQL: A Guide to Querying Fields with Spaces
Mastering Sitecore and GraphQL: A Guide to Querying Fields with Spaces Introduction When I was developing my iOS App to connect to Sitecore Headless feature. I found a problem. The problem was that one of the items in Sitecore, the Question item, had a field that had spaces in it. I was not sure how to construct a GraphQL query in order to display the field item "Question Text" in GraphQL. So I decided to write a blogpost about this so people could benefit from my findings. Always making coders life a little bit easier on this planet. The Problem Let me just show you the problem in order to see if you have a similar issue or not. I have Sitecore items I created a Question item. In the following image; Here we see that the Question 1 from Basic Math Quiz has a field name Question Text. You can see that Question Text is a common name in Sitecore and most of the time people use spaces to create content. We can also see that this is a custom field, because it is intended for thi...