Martin Brehovsky
06/11/2022, 12:50 AMmodule1/src/domain1/Entity.kt:
class Entity {
fun fieldFromDomain1() = Domain1Component.fetchField()
}
module2/src/domain2/Entity.kt:
class Entity {
fun fieldFromDomain2() = Domain2Component.fetchField()
}
The result would be the following type in the schema:
type Entity {
fieldFromDomain1: String!
fieldFromDomain2: String!
}
Is something like this doable? Or is federation the only option we have?Dariusz Kuc
06/12/2022, 4:38 PMMartin Brehovsky
06/13/2022, 12:57 AMDariusz Kuc
06/13/2022, 1:30 AMgraphql-kotlin
uses reflection to generate your schema -> as long as your GraphQL server module exposes stuff (can call into other modules) then it will be part of the same schemaMartin Brehovsky
06/13/2022, 2:44 AMDariusz Kuc
06/13/2022, 2:55 AMgraphql-kotlin
does not offer functionality to merge types from different modules/jarsMartin Brehovsky
06/13/2022, 3:15 AMDariusz Kuc
06/13/2022, 4:05 AMMartin Brehovsky
06/13/2022, 3:44 PM