Skip to content
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

GQL: Variant can be both a float or an object(price range) #6152

Closed
mikemurray opened this issue Mar 18, 2020 · 0 comments · Fixed by #6159
Closed

GQL: Variant can be both a float or an object(price range) #6152

mikemurray opened this issue Mar 18, 2020 · 0 comments · Fixed by #6159
Assignees
Labels
bug For issues that describe a defect or regression in the released software priority high

Comments

@mikemurray
Copy link
Member

mikemurray commented Mar 18, 2020

Issue Description

The price field for Variants can be either a float or an. object e.g. { range, min, max }. This is bad as the type is changing for a field that is labeled as a Float in the GQL schema.

Possible Solution

The data must have a consistent form, regardless of if it's a variant, option or variant with options.

In the simple-pricing plugin

  • The Product and Variant schema extensions should have the field pricing: ProductPricingInfo field, and properly resolve that field as best a possible.
  • We are then, discouraging the use of price and compareAtPrice and instead urge users to use pricing instead.
  • The mutations for updateVariantPrice should still work
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug For issues that describe a defect or regression in the released software priority high
Projects
None yet
2 participants