You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The @Source annotation is a very convenient way of mixing fields from different domains into a single query without polluting the source entity with unrelated fields:
But this doesn't work for input types (e.g. for mutations): they need the fields to be added explicitly, e.g. a team field in the SuperHero. Maybe we could add an @Target annotation as an alternative:
The SuperHeroInput type would have a team field, even when the SuperHero class doesn't.
When a client passes a SuperHeroInput in a request that contains a team field, the core mutation is called ignoring the team field, although this field doesn't exist in the SuperHero class. But the above team method is called just after.
If the parameter annotated as @Target is also annotated as @Source, then the method is also mapped into the result object, using the method name as the field name and the return type as the field type.
The text was updated successfully, but these errors were encountered:
The
@Source
annotation is a very convenient way of mixing fields from different domains into a single query without polluting the source entity with unrelated fields:But this doesn't work for input types (e.g. for mutations): they need the fields to be added explicitly, e.g. a
team
field in theSuperHero
. Maybe we could add an@Target
annotation as an alternative:SuperHeroInput
type would have ateam
field, even when theSuperHero
class doesn't.SuperHeroInput
in a request that contains ateam
field, the core mutation is called ignoring theteam
field, although this field doesn't exist in theSuperHero
class. But the aboveteam
method is called just after.@Target
is also annotated as@Source
, then the method is also mapped into the result object, using the method name as the field name and the return type as the field type.The text was updated successfully, but these errors were encountered: