Loading...
Was this page helpful?
This documentation provides a reference to the useQueryGraphStep
. It belongs to the @medusajs/medusa/core-flows
package.
This step fetches data across modules using the Query.
Learn more in the Query documentation.
To retrieve a list of records of a data model:
To retrieve a single item instead of a an array:
To throw an error if a record isn't found matching the specified ID:
To set pagination configurations:
UseQueryGraphStepInput
UseQueryGraphStepInput<TEntry, TIsList>TEntry
TEntryTIsList
TIsListtrue extends TIsList ? GraphResultSet<TEntry> : Omit<GraphResultSet<TEntry>, "data"> & object extends Item[] ? (Item | WorkflowData<Item>)[] : true extends TIsList ? GraphResultSet<TEntry> : Omit<GraphResultSet<TEntry>, "data"> & object extends object ? { [Key in string | number | symbol]: (true extends TIsList ? GraphResultSet<TEntry> : Omit<GraphResultSet<TEntry>, "data"> & { data: ((...) extends (...) ? (...) : (...))[number] })[Key] | WorkflowData<(true extends TIsList ? GraphResultSet<TEntry> : Omit<GraphResultSet<(...)>, "data"> & { data: (...)[(...)] })[Key]> } : true extends TIsList ? GraphResultSet<TEntry> : Omit<GraphResultSet<TEntry>, "data"> & object & WorkflowDataProperties<true extends TIsList ? GraphResultSet<TEntry> : Omit<GraphResultSet<TEntry>, "data"> & object>
true extends TIsList ? GraphResultSet<TEntry> : Omit<GraphResultSet<TEntry>, "data"> & object extends Item[] ? (Item | WorkflowData<Item>)[] : true extends TIsList ? GraphResultSet<TEntry> : Omit<GraphResultSet<TEntry>, "data"> & object extends object ? { [Key in string | number | symbol]: (true extends TIsList ? GraphResultSet<TEntry> : Omit<GraphResultSet<TEntry>, "data"> & { data: ((...) extends (...) ? (...) : (...))[number] })[Key] | WorkflowData<(true extends TIsList ? GraphResultSet<TEntry> : Omit<GraphResultSet<(...)>, "data"> & { data: (...)[(...)] })[Key]> } : true extends TIsList ? GraphResultSet<TEntry> : Omit<GraphResultSet<TEntry>, "data"> & object & WorkflowDataProperties<true extends TIsList ? GraphResultSet<TEntry> : Omit<GraphResultSet<TEntry>, "data"> & object>true extends TIsList ? GraphResultSet<TEntry> : Omit<GraphResultSet<TEntry>, "data"> & object extends Item[] ? (Item | WorkflowData<Item>)[] : true extends TIsList ? GraphResultSet<TEntry> : Omit<GraphResultSet<TEntry>, "data"> & object extends object ? { [Key in string | number | symbol]: (true extends TIsList ? GraphResultSet<TEntry> : Omit<GraphResultSet<TEntry>, "data"> & { data: ((...) extends (...) ? (...) : (...))[number] })[Key] | WorkflowData<(true extends TIsList ? GraphResultSet<TEntry> : Omit<GraphResultSet<(...)>, "data"> & { data: (...)[(...)] })[Key]> } : true extends TIsList ? GraphResultSet<TEntry> : Omit<GraphResultSet<TEntry>, "data"> & object & WorkflowDataProperties<true extends TIsList ? GraphResultSet<TEntry> : Omit<GraphResultSet<TEntry>, "data"> & object>
true extends TIsList ? GraphResultSet<TEntry> : Omit<GraphResultSet<TEntry>, "data"> & object extends Item[] ? (Item | WorkflowData<Item>)[] : true extends TIsList ? GraphResultSet<TEntry> : Omit<GraphResultSet<TEntry>, "data"> & object extends object ? { [Key in string | number | symbol]: (true extends TIsList ? GraphResultSet<TEntry> : Omit<GraphResultSet<TEntry>, "data"> & { data: ((...) extends (...) ? (...) : (...))[number] })[Key] | WorkflowData<(true extends TIsList ? GraphResultSet<TEntry> : Omit<GraphResultSet<(...)>, "data"> & { data: (...)[(...)] })[Key]> } : true extends TIsList ? GraphResultSet<TEntry> : Omit<GraphResultSet<TEntry>, "data"> & object & WorkflowDataProperties<true extends TIsList ? GraphResultSet<TEntry> : Omit<GraphResultSet<TEntry>, "data"> & object>