Skip to content

Issue with merging fragments with list #457

@mt3593

Description

@mt3593

Hi,

First off brilliant library, getting lots of value out of it.

I updated the library to the latest from 1.2 to 1.2.2, which contained this fix #452 it was for this fix that I did the update as we also hit the same issue.

The side effect of this now is that the last fragment or list blats the previous data results. Understand that doesn't make a lot of sense but let's say I have this:

query Foo {
  level1 {
    ...Frag_1
    edges {
      node {
        id
        name
      }
    }
  }
}

fragment Frag_1 on Node {
  edges {
    node {
      id
      type
    }
  }
}

You can see that the frag is also now creating a list of nodes. But the Frag_1 has the type field and non fragment version has the name.
The result of this means the last sequence wins, so in the above it will be the non fragment version. Where as it would be the fragment version if that was last in the above.

I'll see if I can get a test setup to show what I mean.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions