docs: change useRemoteQueryStep to useQueryGraphStep (#10051)
* docs: change useRemoteQueryStep to useQueryGraphStep * fix lint errors
This commit is contained in:
@@ -349,7 +349,7 @@ You add a step that deletes the manager using the `deleteManagers` method of the
|
||||
Next, in the same file, add the workflow that deletes a manager:
|
||||
|
||||
export const deleteHighlights = [
|
||||
["30", "manager_id", "If your actor type has a different name, such as vendor, change it to be `{actor_type}_id`."]
|
||||
["29", "manager_id", "If your actor type has a different name, such as vendor, change it to be `{actor_type}_id`."]
|
||||
]
|
||||
|
||||
```ts title="src/workflows/delete-manager.ts" collapsibleLines="1-15" expandButtonLabel="Show Imports" highlights={deleteHighlights}
|
||||
@@ -363,7 +363,7 @@ import {
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
import {
|
||||
setAuthAppMetadataStep,
|
||||
useRemoteQueryStep,
|
||||
useQueryGraphStep,
|
||||
} from "@medusajs/medusa/core-flows"
|
||||
|
||||
// ...
|
||||
@@ -375,17 +375,15 @@ export const deleteManagerWorkflow = createWorkflow(
|
||||
): WorkflowResponse<string> => {
|
||||
deleteManagerStep(input)
|
||||
|
||||
const authIdentities = useRemoteQueryStep({
|
||||
entry_point: "auth_identity",
|
||||
const { data: authIdentities } = useQueryGraphStep({
|
||||
entity: "auth_identity",
|
||||
fields: ["id"],
|
||||
variables: {
|
||||
filters: {
|
||||
app_metadata: {
|
||||
// the ID is of the format `{actor_type}_id`.
|
||||
manager_id: input.id,
|
||||
},
|
||||
},
|
||||
},
|
||||
filters: {
|
||||
app_metadata: {
|
||||
// the ID is of the format `{actor_type}_id`.
|
||||
manager_id: input.id,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
const authIdentity = transform(
|
||||
|
||||
Reference in New Issue
Block a user