Actions17
Query → Get Stories
AI-generatedSummary
Execute a GraphQL query to retrieve stories from the Edworking API using either a predefined operation or a raw GraphQL query.
Inputs
- Mode (required) — Select 'Predefined Operation' to run a documented query with optional JSON variables, or 'Raw GraphQL' to provide a complete custom GraphQL query string with optional operation name and JSON variables.
- Variables — JSON object with variables for the predefined operation; leave empty if none.
- GraphQL Query (required) — Complete GraphQL query or mutation string when using Raw GraphQL mode.
- Operation Name — Optional name of the raw GraphQL operation to send alongside the query.
- Variables (Raw) — JSON object with variables for the raw GraphQL query.
- Result Property Name — If set, stores the GraphQL response data under this property in the output JSON; otherwise, replaces the entire item JSON with the data object.
- Include Extensions — Boolean to include the GraphQL extensions object in the output JSON under '_extensions'.
Output shape
a list of JSON objects, each representing the GraphQL response data for an input item
Each output item corresponds to one input item. If 'Result Property Name' is set, the GraphQL data is nested under that property; otherwise, the item JSON is replaced. If 'Include Extensions' is enabled and the response includes extensions, they are added under the '_extensions' property. Errors during execution throw a node error unless 'Continue On Fail' is enabled, in which case error information is output per item.
Examples
Example 1: Retrieve stories using a predefined query without variables
Set Mode to 'Predefined Operation', select the 'Get Stories' operation, and leave Variables empty or set to '{}'. The response data will replace the item JSON or be nested under the specified Result Property Name if set.
Example 2: Run a custom raw GraphQL query
Set Mode to 'Raw GraphQL', input the full GraphQL query string, optionally provide an operation name and JSON variables. The node executes the query and outputs the data accordingly.