6

I am creating a JSS application in code first approach, so I always test the components in disconnected mode. As I have proper route files, all the pages are working as expected in the disconnected mode.

But we have a requirement to use the graphQL in one of the component to fetch a folder and it's child items. So I Implemented the component to fetch content using graphQL, I did create a similar content and folder structure in the jss app under .\data\content\ but while testing query returns null/empty.

Query works in connected mode and integrated mode, but we would like to continue in disconnected mode for a while. So is there a way to run the graphQL in disconnected mode.? like how we are running the other pages and components using yml definitions.

1 Answer 1

6

Not possible out of the box in version 11.0, You can try to mock the data.

From the JSS website:

Using Sitecore GraphQL with GraphQL tooling

Many kinds of GraphQL tools (such as eslint-plugin-graphql to validate queries at build time, or graphql-tools to create a disconnected mock GraphQL API

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.