Apollo iOS - fragments on tags - used across model objects causes namespace collisions?

Hello

On my GQL server, we have various model objects, let’s call them Foo and Bar. Both foo and bar have a field called tags which resolve to the same server side Tags model.

So in theory, I can make queries like

foo (or) bar
{
   fooOrBarSpecificFields go here... 
   tags 
  {
    id
    name, 
    created
    modified
    owner 
    { 
         id
    } 
  }
}

Thats fine, but I also want to make a fragment on tags:

fragment myTagFragment on Tag 
{ 
    id
    name, 
    created
    modified
    owner 
    { 
         id
    } 
}

and now my queries for Foo and Bar become:

foo (or) bar
{

   fooOrBarSpecificFields go here... 
   tags 
  {
    ... myTagFragment
  }
}

This in theory should work, and does in the servers GraphiQLConsole, but when I compile using ./apollo-ios-cli generate I get errors like

  - TypeNameConflict: Field 'tag' conflicts with field 'tag' in GraphQL definition `Foo.TaggedItem`. 

Is there a mechanism to have common fragments resolve to their own to level name space which could then be shared across objects that have the shared fields? In my actual non trivial use case the Tag is shared across many model objects, and having access to a single fragment model would be very very helpful.

Thank you for any insight!

So in theory aliasing the tags field for each of my models allows this to compile, but it seems to break actual server calls as I now get:

Query complexity exceeds the maximum allowed of 10 if I make all of the aliases I need?

I’ve also tried the experimental schema options for field merging which made no difference for the compilation side (as an alternative to the aliasing)

I’d appreciate any other advice.

Ugh this was so dumb.

the issue was the actual name of the fragment which I didnt realize made a name collision. This can be safely ignored. I had tags, and was using a fragment named tags, which caused the collision across all models with tags field.