Skip to content

Adds support for identifying trivial data fetchers and ignoring trivial fields in tracing#1300

Merged
bbakerman merged 3 commits into
graphql-java:masterfrom
bbakerman:1299-trivial-data-fetcher-support
Nov 5, 2018
Merged

Adds support for identifying trivial data fetchers and ignoring trivial fields in tracing#1300
bbakerman merged 3 commits into
graphql-java:masterfrom
bbakerman:1299-trivial-data-fetcher-support

Conversation

@bbakerman

Copy link
Copy Markdown
Member

see #1299

@bbakerman bbakerman requested a review from andimarek November 3, 2018 23:18
*/
default boolean isTrivialDataFetcher() {
return false;
}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be a default method or a marker interface that some one implements? I like this because subclassing is easier

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decided to keep current behavior for completeness and allow people to opt into less information if they choose. So default is that trivial fields ARE included by default


public static Options newOptions() {
return new Options(false);
}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What should the default be? include ALL fields by default or exclude trivial fields byy default?

@andimarek andimarek added this to the 12.0 milestone Nov 5, 2018
@bbakerman bbakerman merged commit c74b23e into graphql-java:master Nov 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants