https://kotlinlang.org logo
#graphql-kotlin
Title
# graphql-kotlin
d

Daniel Ryan

01/06/2022, 6:06 PM
Hi all, Does anyone have any advice regarding support for
DataFetcherResult<List<DataFetcherResult<Entity>>>
style return types as per this issue? https://github.com/ExpediaGroup/graphql-kotlin/issues/1337 I am happy to try and get a PR to add support for this; but before doing so, I wanted to make sure this requirement makes sense and get any advice on how to implement this feature?
d

Dariusz Kuc

01/06/2022, 8:58 PM
somewhat curious on the use case here -> if you already have computed the result why do you need to update the local context?
d

Daniel Ryan

01/06/2022, 9:20 PM
Sure, this is not really explained by the simple example provided, but it is for what I believe is a typical use case for localStorage. It is for the case whereby entity allows listing sub-entities, and these sub-entities might have sub-sub-entities. Each level needs to understand the context of the previous levels to be able to filter effectively (for example region->sales->items). I am not experienced with GraphQL, but I believe it is this kind of use-case that localStorage was created for?
👍 1
d

Dariusz Kuc

01/06/2022, 9:42 PM
gotcha yeah if
entity
have some child fields that would be function calls then yeah I guess you would use local context
👍 1
d

Daniel Ryan

01/07/2022, 2:41 PM
Created a PR. I would be very gratefully if someone can review? As well as testing that the schema generation works, I also tested on my application to make sure it works with the GraphQL Java libraries and it does 🙂 https://github.com/ExpediaGroup/graphql-kotlin/pull/1338
3 Views