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
I have gone through the documentation of Show and Reviews and understand that it could be federated with following code.
@DgsEntityFetcher(name = "Show")
public Show movie(Map<String, Object> values) {
return new Show((String) values.get("id"), null);
}
@DgsData(parentType = "Show", field = "reviews")
public List<Review> reviewsFetcher(DgsDataFetchingEnvironment dataFetchingEnvironment) {
Show show = dataFetchingEnvironment.getSource();
return reviews.get(show.getId());
}
But my problem is that not enough documentation is provided to understand how leverage the federation if entity is child element like below schema:-
type User
{
id:String
name :String
product:Product
}
type Product @key(fields: "id") @extends{
id : String @external
}
As you see type product is part of User and I am trying to make it work with following code, but it is not working. I tried to implement this in multiple ways but it is not working. If you have any sample code or documentation that would be helpful.
I have gone through the documentation of Show and Reviews and understand that it could be federated with following code.
But my problem is that not enough documentation is provided to understand how leverage the federation if entity is child element like below schema:-
As you see type product is part of User and I am trying to make it work with following code, but it is not working. I tried to implement this in multiple ways but it is not working. If you have any sample code or documentation that would be helpful.
The text was updated successfully, but these errors were encountered: