You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, we are trying to migrate to the new DGS Spring Boot starter (graphql-dgs-spring-graphql-starter). One problem we cannot overcome is this - we have GraphQLContextContributor storing the value into GraphQL context for further usage like this (simplified):
@DgsData(parentType ="Entity", field ="someField")
funentitySomeField(dfe:DgsDataFetchingEnvironment): CompletableFuture<String> {
val loader = dfe.getDataLoader<String, String>(BatchEntitiesDataLoader::class.java)
return loader.load(dfe.getSource<Entity>().id)
}
Until now this has worked nicely and we could access the stored context value for key foo in the batch loader, but after switching to the new starter, the loader environment has now an different, empty GraphQL context which doesn't contain the value stored in the context contributor (we made sure the contributor is invoked and actually stores the value to the context it is accessing).
Expected behavior
The GraphQL context is properly propagated to the BatchLoaderEnvironment and we can access the value stored in context contributor.
Actual behavior
The BatchLoaderEnvironment has different, empty GraphQL context.
Steps to reproduce
See above
Is this a bug, or are there some changes required after switching to the new starter?
The text was updated successfully, but these errors were encountered:
Hi, we are trying to migrate to the new DGS Spring Boot starter (
graphql-dgs-spring-graphql-starter
). One problem we cannot overcome is this - we haveGraphQLContextContributor
storing the value into GraphQL context for further usage like this (simplified):Next we have batch data loader defined like:
Which is invoked via
Until now this has worked nicely and we could access the stored context value for key
foo
in the batch loader, but after switching to the new starter, the loader environment has now an different, empty GraphQL context which doesn't contain the value stored in the context contributor (we made sure the contributor is invoked and actually stores the value to the context it is accessing).Expected behavior
The GraphQL context is properly propagated to the
BatchLoaderEnvironment
and we can access the value stored in context contributor.Actual behavior
The
BatchLoaderEnvironment
has different, empty GraphQL context.Steps to reproduce
See above
Is this a bug, or are there some changes required after switching to the new starter?
The text was updated successfully, but these errors were encountered: