Skip to content

@Arg undefined in @FieldResolver #1158

Answered by MichalLytek
cnps asked this question in Q&A
Discussion options

You must be logged in to vote

Following various examples, it seems @arg from parent query, is not getting passed to @FieldResolver.

Because that's how GraphQL was designed. Fields have own arguments and should never rely on arguments of the parent query because they are independent and field resolver can be executed as a part of other query.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@cnps
Comment options

@MichalLytek
Comment options

@cnps
Comment options

Answer selected by cnps
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