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
type Query {
shows(ids: [Int]): [Show]
}
type Show {
id: Int
actor: Actor
}
type Actor {
id: Int
}
and my data fetcher
@DgsQuery
public List<Show> shows(DgsDataFetchingEnvironment dfe, @InputArgument List<Integer> ids) {
return showService.getShows();
}
@DgsData(parentType = Show, field = actor)
public Actor actor(DgsDataFetchingEnvironment dfe) {
// how can I get ids in shows() argument?
return new Actor();
}
I know it can get argument in shows by using dfe.getArgument() , but what if I want to get argument in actor?
Is there anyway to pass the List<Integer> ids to the data fetcher for actor?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
schema:
and my data fetcher
I know it can get argument in shows by using
dfe.getArgument(), but what if I want to get argument in actor?Is there anyway to pass the
List<Integer> idsto the data fetcher for actor?Beta Was this translation helpful? Give feedback.
All reactions