it's been a while since i used kgraphql, does it s...
# kgraphql
j
it's been a while since i used kgraphql, does it support generics yet ?
j
No not yet
j
if i remember correctly, from looking at the source code, adding generics would have required major rework my use-case at the time was that i needed a base-class of type T and then let other classes extend that class got around that by copying and pasting all the base-fields everywhere, not very elegant, but it did the job
j
Sounds like you would be better of using a graphql union type instead? GraphQL in itself is also strongly typed, so you can't really use any generic types.
j
Had no idea there was a union type, just needed to get rid of a JS backend and replace it with Kotlin, so dropped KGraphQL in there. React + Apollo was mangling the JSON a bit, so had to adapt the JSON before sending it to the GraphQL parser. Will revisit GraphQL in the next project when i have to deal with something like this again