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
When Spring boot actuator is present, values passed to child data fetcher via localContext should be accessible following the documentation.
Actual behavior
Values are overridden to instead be a Map containing a SimpleObservation value.
Class cast exception then occurs follows:
"message": "java.lang.ClassCastException: class graphql.GraphQLContext cannot be cast to class java.util.Map (graphql.GraphQLContext is in unnamed module of loader 'app'; java.util.Map is in module java.base of loader 'bootstrap')",
Steps to reproduce
Create Spring boot project with web, graphql, actuator, and dgs dependencies
In your example app, you are including the dependency spring-boot-starter-graphql, which is causing this issue (see this code). If you remove that dependency, your example app works fine.
Please read our contributor guide before
creating an issue.
Expected behavior
When Spring boot actuator is present, values passed to child data fetcher via
localContext
should be accessible following the documentation.Actual behavior
Values are overridden to instead be a Map containing a
SimpleObservation
value.Class cast exception then occurs follows:
Steps to reproduce
Minimal Reproducible Example: https://github.com/kevinlee2198/dgs-local-context-demo
Note: Remove the actuator dependency and the query works as expected
Note: A test case would be highly appreciated, but we understand that's not always possible
The text was updated successfully, but these errors were encountered: