You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR implements support for dumping Shopify Metaobject definitions and references in the schema files, enabling schema portability across different Shopify stores.
4
+
5
+
### Key Enhancements
6
+
7
+
- **Metaobject Definitions Dump**
8
+
- Adds `fetch_metaobject_definitions()` to retrieve metaobject schemas.
9
+
- Includes `create_metaobject_definition` calls in the schema dump output.
10
+
- Orders metaobjects before metafields in the dump for clarity.
11
+
- Handles metaobject field definitions, access controls, and capabilities.
12
+
- Skips default values for cleaner output.
13
+
14
+
- **Portable References**
15
+
- Converts store-specific metaobject definition IDs (`metaobject_definition_id`) to portable metaobject types (`metaobject_definition_type`) in schema dumps.
16
+
- Updates validations to use types instead of GIDs, making schema files cross-store compatible.
17
+
- Enhances metafield creation and update logic to resolve types back to GIDs when needed.
18
+
- Supports both single and array values for `list.metaobject_reference` fields.
19
+
- Adds precise validation matching for metaobject reference fields.
20
+
21
+
### Latest Commits Context
22
+
23
+
- Added portable metaobject references in schema dumps: metaobject definition IDs are now converted to types for portability.
24
+
- Metaobject definitions are included in schema dumps before metafields, supporting cross-store references and capabilities.
25
+
- Parsing logic for metaobjects and metafields is separated for clearer schema structure.
26
+
- Common metaobject methods were extracted to a shared module for code reuse.
27
+
- Metaobject reference fields are now correctly handled during creation and updates.
28
+
- Schema dump now supports multiple metaobject_definition_ids for enhanced flexibility.
29
+
- Migrator now includes metaobject statements for full portability.
30
+
- Error handling was improved for failed metafield creation, providing better context.
31
+
- Field validation for metaobjects is now deferred, preventing failures when referencing not-yet-created definitions; admin access management was updated to skip settings not supported via API.
0 commit comments