Apollo-android: New code generation engine generates code missing fragment specifications

Created on 30 Aug 2019  路  4Comments  路  Source: apollographql/apollo-android

After upgrading to version 1.1.1, we noticed some missing fragments in the generated query. Our schema is quite complex but we can simplify it this way:

query my_query {
   a {
      ... fragmentA
   }
}

fragment fragmentA on A {
   b {
      ... fragmentB
   }
}

fragment fragmentB on B {
   ... on ImplC {
      c {
         ... fragmentC
      }
   }
}

fragment fragmentC on C {
   something
}

type ImplC implements InterfaceC {
   something_else
}

interface InterfaceC {
   something_else
}

fragmentC doesn't show in the query.

This issue looks very similar to #1523 but I also think it's related to the interface. Every missing fragment is somehow included through an interface.

compiler Bug

Most helpful comment

Ok, good news I was able to reproduce.

All 4 comments

Hm, wonder what is the difference between the case in #1523 and your issue. Is there any way you can provide me more info, like DM schema and query so I can reproduce the issue?

I'm sorry but I don't really feel comfortable sharing this information. Anything I should look out for?

Ok, let me try smth I see that in your case there is inline fragment involved, maybe this is a case. Will try to reproduce it on our test fixtures.

Ok, good news I was able to reproduce.

Was this page helpful?
0 / 5 - 0 ratings