Rename Web[Input|Output] to WebGraphQl[Request|Response]

See gh-332
This commit is contained in:
rstoyanchev
2022-03-20 20:26:45 +00:00
parent 182e9e66f0
commit 67711f7331
27 changed files with 295 additions and 279 deletions

View File

@@ -130,12 +130,12 @@ transformation of the `graphql.ExecutionInput`:
class MyInterceptor implements WebInterceptor {
@Override
public Mono<WebOutput> intercept(WebInput webInput, WebInterceptorChain chain) {
webInput.configureExecutionInput((executionInput, builder) -> {
public Mono<WebGraphQlResponse> intercept(WebGraphQlRequest request, WebInterceptorChain chain) {
request.configureExecutionInput((executionInput, builder) -> {
Map<String, Object> map = ... ;
return builder.extensions(map).build();
});
return chain.next(webInput);
return chain.next(request);
}
}
----
@@ -148,12 +148,12 @@ the `graphql.ExecutionResult`:
class MyInterceptor implements WebInterceptor {
@Override
public Mono<WebOutput> intercept(WebInput webInput, WebInterceptorChain chain) {
return chain.next(webInput)
.map(webOutput -> {
Object data = webOutput.getData();
public Mono<WebGraphQlResponse> intercept(WebGraphQlRequest request, WebInterceptorChain chain) {
return chain.next(request)
.map(response -> {
Object data = response.getData();
Object updatedData = ... ;
return webOutput.transform(builder -> builder.data(updatedData));
return response.transform(builder -> builder.data(updatedData));
});
}
}