Skip to content

Should DgsDataFetchingEnvironment or DataFetchingEnvironment be used as query/mutation argument? #624

Discussion options

You must be logged in to vote

The DataFetchingEnvironment comes from the graphql-java Library. The DGS framework extends it to add some convenience methods.
If you don’t need the convenience methods, it really doesn’t matter which one you use.
Whichever type you use, it will receive the same instance at runtime.

I find myself defaulting to DgsDataFetchingEnvironment most of the time, but haven’t been very consistent about it.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by carmas-RatedPower
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants