-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: local workflow proxying methods to pass context #6263
Conversation
🦋 Changeset detectedLatest commit: ff4eec1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Ignored Deployments
|
…re/workflow-passing-context
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to be sure, this means these two code snippets are functionally identical right?
Explicit context:
createStep("some-step", (input, { container, context }) => {
const moduleService = container.resolve("someModule")
await moduleService.create(data, context)
})
Magical context
createStep("some-step", (input, { container }) => {
const moduleService = container.resolve("someModule")
await moduleService.create(data)
})
In the latter case, the context is passed (under the hood/magically) as if we were doing it explicitly.
this.container = this.contextualizedMedusaModules(container) | ||
} | ||
|
||
private contextualizedMedusaModules(container) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be good to have @adrien2p's eye on this one
packages/utils/src/modules-sdk/decorators/inject-transaction-manager.ts
Outdated
Show resolved
Hide resolved
That is correct. |
…re/workflow-passing-context
10066c5
to
469234a
Compare
Should we merge this one? |
I think so. |
I would say yes 🙏 |
What:
requestId
to reqWhy: