Skip to content

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

Closed
@mushipeas

Description

@mushipeas

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions