docs: add details on updating a cart's customer (#10226)
Should be merged after releasing v2.0.5 Closes DX-1096
This commit is contained in:
+2
-2
@@ -106,7 +106,7 @@ const myWorkflow = createWorkflow(
|
||||
const today = new Date()
|
||||
|
||||
return new WorkflowResponse({
|
||||
today
|
||||
today,
|
||||
})
|
||||
})
|
||||
|
||||
@@ -117,7 +117,7 @@ const myWorkflow = createWorkflow(
|
||||
const today = transform({}, () => new Date())
|
||||
|
||||
return new WorkflowResponse({
|
||||
today
|
||||
today,
|
||||
})
|
||||
})
|
||||
```
|
||||
|
||||
@@ -16,7 +16,7 @@ Each workflow step must have a unique ID, which is the ID passed as a first para
|
||||
|
||||
```ts
|
||||
const useQueryGraphStep = createStep(
|
||||
"use-query-graph",
|
||||
"use-query-graph"
|
||||
// ...
|
||||
)
|
||||
```
|
||||
@@ -29,13 +29,13 @@ const helloWorkflow = createWorkflow(
|
||||
() => {
|
||||
const { data: products } = useQueryGraphStep({
|
||||
entity: "product",
|
||||
fields: ["id"]
|
||||
fields: ["id"],
|
||||
})
|
||||
|
||||
// ERROR OCCURS HERE: A STEP HAS THE SAME ID AS ANOTHER IN THE WORKFLOW
|
||||
const { data: customers } = useQueryGraphStep({
|
||||
entity: "customer",
|
||||
fields: ["id"]
|
||||
fields: ["id"],
|
||||
})
|
||||
}
|
||||
)
|
||||
@@ -63,13 +63,13 @@ const helloWorkflow = createWorkflow(
|
||||
() => {
|
||||
const { data: products } = useQueryGraphStep({
|
||||
entity: "product",
|
||||
fields: ["id"]
|
||||
fields: ["id"],
|
||||
})
|
||||
|
||||
// ✓ No error occurs, the step has a different ID.
|
||||
const { data: customers } = useQueryGraphStep({
|
||||
entity: "customer",
|
||||
fields: ["id"]
|
||||
fields: ["id"],
|
||||
}).config({ name: "fetch-customers" })
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user