I’m trying to figure out how to “connect” my `Kotl...
# graphql-kotlin
m
I’m trying to figure out how to “connect” my
KotlinDataLoader
and my custom context derived from
SpringGraphQLContext
. Is there any way to use the custom context from the dataloader itself?
*context is accessible from data fetching env
m
Thanks. Just to make sure I understand the discussion well - in the case I need
DataFetchingEnvironment
, I cannot use
KotlinDataLoader
, but I have to build a
DataFetcher
and then deal with the registration myself?
d
kotlin data loader is an abstraction over basic data loader
What Shane was saying is that you can access the data fetching env/context from a method that invokes the data loader edit: discussion was showing an example with custom data fetcher for late init field
m
Thanks, I need to wrap my head around it a bit more. Will likely ask more questions 🙂
d
ah actually the response there is to use custom data fetcher (that invokes the data loader) for the late init field