-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Discussed in #3912
Originally posted by samuelAndalon April 11, 2025
Hello from graphql-kotlin!! first of that wanted to thank you all for this library, the reason I am reaching out is because we noticed this PR #3754 and the performance that will provide!, we created something very similar in graphql-kotlin
ExpediaGroup/graphql-kotlin#2079
while I was working on it I thought it might be a good addition to have a DataFetcherFactory
with no DataFetcherFactoryEnvironment
as argument, or maybe with a Supplier, similar to the LightDataFetcher
.
The reason to ask for this is because graphql-kotlin
is code first, so we don't actually need the DataFetcherFactoryEnvironment
when creating data fetchers, we create them with reflection, so instantiating a DataFetcherFactoryEnvironment
per data fetcher per field per query could be a source of memory bottleneck as is not used for Singleton Factories
private static final DataFetcherFactory<?> SINGLETON_FETCHER_FACTORY = environment -> SINGLETON_FETCHER;
```</div>