Merged
Conversation
This is not a native Product attribute, so it requires special handling
…/shopify into feature/pt-2562-graphql-support
This reverts commit f2db62a.
There was a problem hiding this comment.
Pull request overview
Adds Craft CMS GraphQL exposure for Shopify Product elements in the 7.1 line, along with a new totalInventory product property/query param and supporting DB/generated-column changes.
Changes:
- Register Shopify Product GraphQL types, queries, resolvers, and schema permissions.
- Add
totalInventorysupport end-to-end (element property, query arg, query filtering, generated DB column + migration). - Update docs/changelog to describe the new GraphQL capabilities.
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| src/translations/en/shopify.php | Adds a new permission label translation (“View products”). |
| src/services/Products.php | Fixes eager-loading by setting variants onto products (instead of metafields). |
| src/Plugin.php | Registers GQL types/queries/schema components and bumps schema version. |
| src/migrations/m260401_070605_add_totalInventory_generated_column.php | Adds a generated column for totalInventory on existing installs. |
| src/migrations/Install.php | Adds totalInventory generated column creation for fresh installs. |
| src/gql/types/Variant.php | Introduces GraphQL object type for Shopify variants. |
| src/gql/types/Option.php | Introduces GraphQL object type for Shopify options. |
| src/gql/types/Metafield.php | Introduces GraphQL object type for Shopify metafields. |
| src/gql/types/Image.php | Introduces GraphQL object type for Shopify images. |
| src/gql/types/generators/ProductType.php | Adds a generator for the concrete Shopify Product GraphQL type. |
| src/gql/types/elements/Product.php | Adds the concrete Product element GraphQL type + custom field resolution. |
| src/gql/resolvers/elements/Product.php | Adds GraphQL resolver logic for product queries/field resolution. |
| src/gql/queries/Product.php | Adds shopifyProducts, shopifyProduct, and shopifyProductCount queries. |
| src/gql/interfaces/elements/Product.php | Defines the GraphQL interface for Shopify products and field definitions. |
| src/gql/arguments/elements/Product.php | Adds GraphQL query arguments for filtering Shopify products (incl. totalInventory). |
| src/fields/Products.php | Exposes the Products relation field via GraphQL with appropriate args/resolver. |
| src/elements/Product.php | Adds GQL type naming/scopes and a totalInventory element property. |
| src/elements/db/ProductQuery.php | Adds totalInventory query param support and selects/filters it in SQL. |
| README.md | Documents GraphQL usage and extends upgrade notes. |
| CHANGELOG.md | Records new GraphQL support and totalInventory additions for 7.1.0. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/migrations/m260401_070605_add_totalInventory_generated_column.php
Outdated
Show resolved
Hide resolved
… into feature/pt-2562-graphql-support
Agent-Logs-Url: https://github.com/craftcms/shopify/sessions/435f4462-160e-4fa6-bf94-06f123b0c9be Co-authored-by: nfourtythree <266453+nfourtythree@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.