smallrye / smallrye-graphql

Implementation for MicroProfile GraphQL
Apache License 2.0
155 stars 89 forks source link

Schema Builder doesn't support inheriting interface field with subtype #2122

Closed zche-theScore closed 1 month ago

zche-theScore commented 1 month ago

Suppose we have the GraphQL Schema below

interface FieldInterface {...}
type FieldType implements FieldInterface {...}
interface ContainerInterface {
  field: FieldInterface
}

According to GraphQL spec, we can have a type

type ContainerType {
  field: FieldType
}

However, as my test cases show, if I define the Java Classes/Interfaces the same way as the GraphQL type relationship, the schema builder would generate field: FieldInterface instead of field: FieldType in ContainerType.

zche-theScore commented 1 month ago

I PRed a simple fix here https://github.com/zche-theScore/smallrye-graphql-inherit-field-with-subtype/pull/1

jmartisk commented 1 month ago

Could you add the contents of that PR here? The fix should be in the same PR as the tests :) Thanks!

zche-theScore commented 1 month ago

Implementation done. May I get some reviews? Thanks cc. @mskacelik @phillip-kruger @ybroeker

zche-theScore commented 1 month ago

Hi @jmartisk, I would like to know if there will be a planned release soon?

jmartisk commented 1 month ago

@zche-theScore there are some issues currently with the release pipeline for SmallRye projects, but I'll see what can be done

zche-theScore commented 1 month ago

Hi, I see the latest release doesn't contain this. Is there any issues with these changes?

jmartisk commented 1 month ago

@zche-theScore I'm planning to release 2.9.0 to be included in Quarkus 3.13, which is coming out sometime in late July. I'll do the SmallRye release probably in the first half of July to allow some time for the upgrade (and vacations etc), if that's fine with you.