chore(docs): Generated References (automated) (#12824)

Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
This commit is contained in:
github-actions[bot]andolivermrbl authored and GitHub committed 2025-06-25 13:51:49 +03:00
1 parent e698a09be7
commit 2b0c8c6662
932 files changed
+342117 -335859

No files matched your search

@@ -9,83 +9,14 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `useQueryGraphStep` step. It belongs to the `@medusajs/medusa/core-flows` package.
This step fetches data across modules using the Query.
## Type Parameters
Learn more in the [Query documentation](https://docs.medusajs.com/learn/fundamentals/module-links/query).
<TypeList types={[{"name":"TEntry","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="useQueryGraphStep"/>
## Example
## Parameters
To retrieve a list of records of a data model:
<TypeList types={[{"name":"input","type":"[UseQueryGraphStepInput](../../types/helper_steps.UseQueryGraphStepInput/page.mdx)&#60;TEntry&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"options","type":"[RemoteJoinerOptions](../../../types/interfaces/types.RemoteJoinerOptions/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="useQueryGraphStep"/>
```ts
const { data: products } = useQueryGraphStep({
entity: "product",
fields: [
"*",
"variants.*"
]
})
```
## Returns
To retrieve a single item instead of a an array:
```ts
const { data: products } = useQueryGraphStep({
entity: "product",
fields: [
"*",
"variants.*"
],
filters: {
id: "123"
}
})
```
To throw an error if a record isn't found matching the specified ID:
```ts
const { data: products } = useQueryGraphStep({
entity: "product",
fields: [
"*",
"variants.*"
],
filters: {
id: "123"
},
options: {
throwIfKeyNotFound: true
}
})
```
To set pagination configurations:
```ts
const { data: products } = useQueryGraphStep({
entity: "product",
fields: [
"*",
"variants.*"
],
filters: {
id: "123"
},
pagination: {
take: 10,
skip: 10,
order: {
created_at: "DESC"
}
}
})
```
## Input
<TypeList types={[{"name":"UseQueryGraphStepInput","type":"[UseQueryGraphStepInput](../../types/helper_steps.UseQueryGraphStepInput/page.mdx)&#60;TEntry&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" openedLevel={1} sectionTitle="useQueryGraphStep"/>
## Output
<TypeList types={[{"name":"GraphResultSet","type":"[GraphResultSet](../../../types/ModulesSdkTypes/types/types.ModulesSdkTypes.GraphResultSet/page.mdx)&#60;TEntry&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" openedLevel={1} sectionTitle="useQueryGraphStep"/>
<TypeList types={[{"name":"ReturnType","type":"ReturnType&#60;[StepFunction](../../../workflows/types/workflows.StepFunction/page.mdx)&#60;[UseQueryGraphStepInput](../../types/helper_steps.UseQueryGraphStepInput/page.mdx)&#60;TEntry&#62;, [GraphResultSet](../../../types/ModulesSdkTypes/types/types.ModulesSdkTypes.GraphResultSet/page.mdx)&#60;TEntry&#62;&#62;&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="useQueryGraphStep"/>