feature: Use class name by default for @DgsDataLoader#name
, and add some inline methods to DgsDataFetchingEnvironment
#861
Labels
enhancement
New feature or request
Need more detail
This issue needs more detail, or will be closed otherwise.
stale
Please read our contributor guide beforecreating an issue. Also consider discussing your idea on
the discussion forum first.
Describe the Feature Request
The the annotated class's name as the
name
field of the@DgsDataLoader
annotation by defaultWhen annotating methods use something like
SimpleClassName.methodName
Describe Preferred Solution
Using
We can then do:
We may also wish to add some extra (inline-reified) methods to DgsDataFetchingEnvironment, for example:
Which gives us compile-time type checking:
incorrect:
correct:
Describe Alternatives
For the annotation proposal: keep it as is
For the methods:
would work instead of 4 seperate functions, but this does not do any type checking, it merely avoids having to use
::class.java
:Contributing
Would be willing to contribute a PR, or two separate ones.
The text was updated successfully, but these errors were encountered: