Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAllow and process DataFetcherResult as an item for GraphQL List fields. #1567
Conversation
|
Thanks for this. This is an elegant solution. It seems the existing code handled this really neatly (which is a change ;) ) |
Issue #1559 outlines a lack of control over list items in fetcher result for a list field, in particular, the inability to set a localContext for each item of a list. This pull request modifies list result handling in
ExecutionStrategyclass allowing an instance ofDataFetcherResultas an item of a list. After the improvement, individual list itemsDataFetcherResultare handled the same way as a regular field's value ofDataFetcherResulttype: errors are added to query result, localContext for child nodes of the item is set.