Skip to content

[7.1] Craft GraphQL support#206

Merged
nfourtythree merged 37 commits into7.1from
feature/pt-2562-graphql-support
Apr 3, 2026
Merged

[7.1] Craft GraphQL support#206
nfourtythree merged 37 commits into7.1from
feature/pt-2562-graphql-support

Conversation

@nfourtythree
Copy link
Copy Markdown
Contributor

No description provided.

@nfourtythree nfourtythree self-assigned this Mar 25, 2026
@linear
Copy link
Copy Markdown

linear bot commented Mar 25, 2026

PT-2562 GraphQL Support

@nfourtythree nfourtythree requested a review from Copilot April 2, 2026 10:18
@nfourtythree nfourtythree marked this pull request as ready for review April 2, 2026 10:19
@nfourtythree nfourtythree requested a review from a team as a code owner April 2, 2026 10:19
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 totalInventory support 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.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@nfourtythree nfourtythree merged commit a477533 into 7.1 Apr 3, 2026
10 checks passed
@nfourtythree nfourtythree deleted the feature/pt-2562-graphql-support branch April 3, 2026 05:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants