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

Issue with merging fragments with list #457

Open
mt3593 opened this issue Mar 22, 2024 · 0 comments
Open

Issue with merging fragments with list #457

mt3593 opened this issue Mar 22, 2024 · 0 comments

Comments

@mt3593
Copy link

mt3593 commented Mar 22, 2024

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.

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

No branches or pull requests

1 participant