Skip to content

Add products field to the root query#23

Merged
AlessioRocco merged 6 commits intomasterfrom
product-type
Oct 18, 2019
Merged

Add products field to the root query#23
AlessioRocco merged 6 commits intomasterfrom
product-type

Conversation

@AlessioRocco
Copy link
Copy Markdown
Contributor

@AlessioRocco AlessioRocco commented Oct 11, 2019

Add products field to the root query, the Product Type has the basic fields, variants and option_types connections, and the master variant.

@AlessioRocco AlessioRocco force-pushed the product-type branch 8 times, most recently from 7a30aa6 to 04aa9cb Compare October 11, 2019 12:18
@AlessioRocco AlessioRocco self-assigned this Oct 11, 2019
@AlessioRocco AlessioRocco force-pushed the product-type branch 4 times, most recently from 1f6af4e to c553c68 Compare October 11, 2019 12:33
@AlessioRocco AlessioRocco added the WIP Work in progress label Oct 11, 2019
@AlessioRocco AlessioRocco removed the WIP Work in progress label Oct 11, 2019
It adds a basic Product Type that is used in the products field in the
query root.

The products field uses the Spree::Queries::ProductsQuery object to
retrieve the products.
It adds the variants connection field to the Product Type and uses the
Spree::Queries::Product::VariantsQuery query object with batch loader
to retrieve the product variants.
@AlessioRocco AlessioRocco force-pushed the product-type branch 2 times, most recently from 0b97549 to a9888d8 Compare October 18, 2019 08:21
It adds the master variant field to the Product Type and uses the
Spree::Queries::Product::MasterVariantQuery query object with batch
loader to retrieve the product master variant.
@AlessioRocco AlessioRocco force-pushed the product-type branch 3 times, most recently from f34e67c to cfefe43 Compare October 18, 2019 10:31
graphql-ruby removes the Type suffix if we don't specify it with
graphql_name.

Also change the description.
It adds the option types connection field to the Product Type and uses
the Spree::Queries::Product::OptionTypesQuery query object with batch
loader to retrieve the product option types.
Using command "bundle exec rake schema:idl"
Copy link
Copy Markdown
Contributor

@ChristianRimondi ChristianRimondi left a comment

Choose a reason for hiding this comment

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

👍

@AlessioRocco AlessioRocco merged commit 5b57795 into master Oct 18, 2019
@AlessioRocco AlessioRocco deleted the product-type branch October 18, 2019 10:46
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.

2 participants