typelevel / grackle

Grackle: Functional GraphQL for the Typelevel stack
http://typelevel.org/grackle/
Apache License 2.0
176 stars 25 forks source link

Regression introduced in 0.18.1 #590

Closed umazalakain closed 6 months ago

umazalakain commented 6 months ago

Version 0.18.1 introduced a bug not present in 0.18.0. The following query was working correctly in 0.18.0:

{
  a {
    ... AFields
  }
}

fragment XFields on X {
  x
}

fragment YFields on Y {
  y
}

fragment AFields on A {
  ... XFields
  ... YFields
}

With a schema

type Query {
  a: A!
}

union A = X | Y

type X {
  x: String!
}

type Y {
  y: String!
}

In 0.18.1 we get an error Fragment 'AFields' is not compatible with type 'A'

I'll try to find some time and write a test case

umazalakain commented 6 months ago

Failing test case can be found in https://github.com/umazalakain/grackle/commit/6746b12671dd0c92a7ee0e30ed7d9d2267bf7d2d

milessabin commented 6 months ago

Fantastic ... thank you!