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)
  • Sitecore Headless Services CD WDP for Sitecore XP
  • Sitecore Experience Edge Connector for Sitecore 10.2.0 XP 20.0.0
  • Sitecore Experience Accelerator 10.2.0 rev. 04247
  • Create a JSS project for the latest versions of JSS and Sitecore “npx create-sitecore-jss@ver20”

Local certificate has been created successfully and deployed the app by following this command.

jss deploy app --includeContent --includeDictionary --acceptCertificate xx:yyetc.

Backend successfully created the

/sitecore/templates/Foundation/JavaScript Services/App

I can run the app on localhost:3000 also can be accessed through newly created url


Issue: I can see the home page and JSS Styleguide live examples, when I navigate to graphql it throws the below error:

Server Error
TypeError: Cannot destructure property 'datasource' of 'props.fields.data' as it is undefined.

69 | const { datasource, contextItem } = props.fields.data;

Following are my frontend env details:


Backend details

JavaScriptServices.ViewEngine.Http.JssEditingSecret = frontend JSS_EDITING_SECRET

I have attached the below screen to explain more in details. Please someone shed a light on this issue. Thanks

enter image description here

enter image description here

enter image description here

1 Answer 1


Hi try looking into this Integrated GraphQL is not working correctly with JSS with SXA

looking at the details you've provided it seems like there is some problem with the api calls when it is executed in code

  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Dec 12, 2022 at 4:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.