Stub data
Last updated
Was this helpful?
Last updated
Was this helpful?
Stub data is hard-coded into a task, providing an unchanging source of data for . It is an important tool when generating . Stub data may be used for user-defined variables, but may also override as needed.
Most tasks make decisions based on the automatically provided, making it a common practice to stub them during preview mode. Any and all Liquid variables may be replaced by stub data, including event
and any .
In simple cases, replacement objects may be constructed using the tag.
For this reason, it's important to allow the shopify filter to run normally, and construct stub data afterwards.
It's also possible to construct this data using .
Mechanic makes GraphQL data available to tasks via the filter. Mechanic observes the shopify filter in action during preview mode, using its inputs to inform Mechanic's knowledge of what permissions the task needs.
It can be useful to specify stub data using JSON, fed through the filter. Sample JSON is easy to generate using .