Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The new dataFetcher created does not respect the original dataFetcher's trivial marker. #87

Closed
mushipeas opened this issue Jul 15, 2023 · 1 comment · Fixed by #88
Closed

Comments

@mushipeas
Copy link
Contributor

Describe the bug
As the library wraps all dataFetchers in the schema, this means that 'trivial' dataFetchers, ones which do not have actually user-implemented code (fields under an object, usually) are wrapped and no longer marked as 'trivial'. This breaks a lot of tracing and metrics implementations which rely on the trivial marker to ignore dataFetchers which don't have user code.

To Reproduce
Any sort of instrumentation (ie. logging instrumentation for dataFetcher run time) which uses the trivial marker to ignore dataFetchers will no longer work as intended. All fields will be logged unnecessarily.

The validationSchemaWiring needs to check if the current DF is an instance of TrivialDataFetcher (https://github.com/graphql-java/graphql-java/blob/master/src/main/java/graphql/TrivialDataFetcher.java) and if so the new ValidationDataFetcher must also implement the interface.

@mushipeas
Copy link
Contributor Author

mushipeas commented Jul 15, 2023

Raised PR for this: #88

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant