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

fix: allow listPrice to be queried on CommerceOrder line items #2864

Merged
merged 1 commit into from Dec 3, 2020
Merged

fix: allow listPrice to be queried on CommerceOrder line items #2864

merged 1 commit into from Dec 3, 2020

Conversation

iskounen
Copy link
Contributor

@iskounen iskounen commented Dec 2, 2020

Description:
This PR allows us to query the listPrice field on an artwork when that artwork is a line item on a CommerceOrder from the stitched Exchange schema like so:

{
  commerceOrder(id: "2e8c7a62-37fe-4702-9e58-2227dd45e295") {
    lineItems {
      edges {
        node {
          artwork {
            listPrice {
              ... on PriceRange {
                display
              }
            }
          }
        }
      }
    }
  }
}

Before this change, the above query threw the following error because the PriceRange type was being transformed as part of the Exchange schema:

__typename did not match an object type: CommercePriceRange

See also:

@artsy artsy deleted a comment from artsy-peril bot Dec 2, 2020
@iskounen iskounen marked this pull request as draft December 2, 2020 23:32
@iskounen iskounen marked this pull request as ready for review December 3, 2020 21:10
@iskounen iskounen assigned sweir27 and unassigned mdole Dec 3, 2020
@sweir27 sweir27 merged commit b1a67f5 into artsy:master Dec 3, 2020
@iskounen iskounen deleted the fix-price-range-on-commerce-order-artwork branch December 3, 2020 21:34
@artsy-peril artsy-peril bot mentioned this pull request Dec 3, 2020
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.

None yet

3 participants