У нас вы можете посмотреть бесплатно Spring Boot GraphQL Tutorial #10 - DataFetcherResult - Returning data and errors или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
It is possible to return both data and multiple errors in a graphql resolver by returning a graphql.execution.DataFetcherResult either directly or wrapped in a CompletableFuture instance for asynchronous execution. (async graphql resolvers in next video). This is a useful when your resolver may need to retrieve data from multiple sources or from another GraphQL resource. For example, if a single resolver makes network connections to two different APIs. If one API returns successfully and the other does not, you may want to return the partially filled object and an error. If you throw an exception, then the full object will be null. If you return the object without an error, then this may mislead your clients. As the data may be temporarily unavailable, not null. DataFetcherResult can also be used to pass extra context to lower resolvers without polluting your graphql schema domain objects. This also allows you to pass down new local context objects between parent and child fields. If you return a local context via setLocalContext(value) then it will be passed down into any child fields via the graphql.schema.DataFetchingEnvironment#getLocalContext(). Have a good one! Cheers Philip Data Fetcher Result: https://github.com/graphql-java/graph... Data Fetching Execution: https://www.graphql-java.com/document... Data Fetching: https://www.graphql-java.com/document... Spring Boot GraphQL: https://github.com/graphql-java-kicks...