Skip to content
This repository has been archived by the owner on May 26, 2023. It is now read-only.

Fragments doesn't work in 0.17.0 #211

Open
1 of 5 tasks
ulrikstrid opened this issue Sep 10, 2019 · 2 comments
Open
1 of 5 tasks

Fragments doesn't work in 0.17.0 #211

ulrikstrid opened this issue Sep 10, 2019 · 2 comments

Comments

@ulrikstrid
Copy link
Contributor

Issue Labels

  • has-reproduction
  • feature
  • docs
  • blocking
  • good first issue

I have a query like this:

query partnerCenterInvoiceLineItems($invoice_id: ID!) {
    partnerCenterInvoiceLineItems(invoice_id: $invoice_id) {
      customerId
      subscriptionId
      customerName
      ... on InvoiceLineItemsOffice {
        offerName
        subtotal
        quantity
        totalForCustomer
        subscriptionName
      }
      ... on InvoiceLineItemAzure {
        postTaxTotal
        postTaxEffectiveRate
        pretaxEffectiveRate
        pretaxCharges
        consumedQuantity
        listPrice
        serviceName
        subscriptionName
        unit
      }
      ... on InvoiceLineItemOneTime {
        subtotal
        quantity
        totalForCustomer
      }
    }
  }

When I use it with 0.17.0 I get errors in the console about heuristics matching and then I get no data. It works with previous versions so this is a regression.

@baransu
Copy link
Contributor

baransu commented Sep 10, 2019

I assume it's not a problem with reason-apollo itself but with underlying apollo-client, here is apollo documentation about it: https://www.apollographql.com/docs/react/advanced/fragments/#fragments-on-unions-and-interfaces

@ulrikstrid
Copy link
Contributor Author

That was my first thought as well so I rolled back the apollo-client version but that didn't help so then I tried to rollback the version if reason-apollo and then it started working again. So something has changed in this repo that broke it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants