query-graphql-default
Execute a syntax-checked GraphQL query against Sitecore's default endpoint and return JSON data for content retrieval and integration tasks.
Instructions
Executes a GraphQL query against the Sitecore 'default' endpoint and returns the data as JSON. The query is syntax-checked before it is sent. Note what the endpoint can see: 'edge' serves published content only (unpublished master changes are invisible to it), while 'master' / preview schemas read the authoring database. Use introspection-graphql-default for the schema SDL.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The GraphQL query document, e.g. 'query($path: String!) { item(path: $path, language: "en") { id name } }'. | |
| variables | No | The query's variables as a JSON object string, e.g. '{"path": "/sitecore/content/Home"}'. Parsed and sent as the GraphQL variables object. |