-
Notifications
You must be signed in to change notification settings - Fork 207
Pass app module context through to registration's activeVersion if it exists #6212
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
Pass app module context through to registration's activeVersion if it exists #6212
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
We detected some changes at Caution DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release. |
f080216
to
b7a6f0d
Compare
/snapit |
Coverage report
Show new covered files 🐣
Show files with reduced coverage 🔻
Test suite run success3126 tests passing in 1324 suites. Report generated by 🧪jest coverage report action from 1afbe62 |
🫰✨ Thanks @jamieguerrero! Your snapshot has been published to npm. Test the snapshot by installing your package globally: pnpm i -g @shopify/[email protected] Tip If you get an Caution After installing, validate the version by running just |
b7a6f0d
to
3df350b
Compare
activeVersion: mod.config | ||
? { | ||
config: JSON.stringify(mod.config), | ||
...(mod.context && {context: mod.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.
This is the main change. Currently, some dashboard managed extensions are failing at importing because we are not passing the app module's context
along here and it is causing things to fail here.
cd34ed7
to
d99dc1e
Compare
d99dc1e
to
1afbe62
Compare
Add support for extension context in app module versions
TL;DR
Fixes https://github.com/shop/issues-develop/issues/17833
Added support for the
target
field in app module versions to enhance extension configuration capabilities.What changed?
target
field to the GraphQL query for released app modulesAppModuleVersion
interface to include the optionaltarget
propertyappExtensionRegistrations
method to include the context field in theactiveVersion
object when both config and target are presentHow to test?
Why make this change?
This change enables extensions to store and retrieve contextual information alongside their configuration. The target field (mapped to context in the client) provides a way for extensions to maintain state or metadata that isn't part of the user-configurable settings but is necessary for proper extension functionality. This enhancement improves the flexibility of the extension system and allows for more sophisticated extension behaviors.