@@ -304,13 +304,12 @@ GraphQlMessageHandler handler(GraphQlService graphQlService) {
304
304
return new GraphQlMessageHandler (graphQlService );
305
305
}
306
306
307
- // @artem
308
307
@ Bean
309
308
IntegrationFlow graphqlQueryMessageHandlerFlow (GraphQlMessageHandler handler ) {
310
309
311
- return IntegrationFlows .from (MessageChannels .flux ("inputChannel" ). datatype ( Object . class , RequestInput . class ) )
310
+ return IntegrationFlows .from (MessageChannels .flux ("inputChannel" ))
312
311
.handle (handler )
313
- .channel (c -> c .flux ("resultChannel" ). datatype ( RequestOutput . class ) )
312
+ .channel (c -> c .flux ("resultChannel" ))
314
313
.get ();
315
314
}
316
315
@@ -354,71 +353,8 @@ AnnotatedControllerConfigurer annotatedDataFetcherConfigurer() {
354
353
355
354
}
356
355
357
- static class QueryResult {
356
+ record QueryResult ( String id ) {}
358
357
359
- private final String id ;
360
-
361
- QueryResult (final String id ) {
362
- this .id = id ;
363
- }
364
-
365
- String getId () {
366
- return this .id ;
367
- }
368
-
369
- @ Override
370
- public boolean equals (Object o ) {
371
- if (this == o ) {
372
- return true ;
373
- }
374
- if (!(o instanceof QueryResult )) {
375
- return false ;
376
- }
377
- QueryResult that = (QueryResult ) o ;
378
- return getId ().equals (that .getId ());
379
- }
380
-
381
- @ Override
382
- public int hashCode () {
383
- return Objects .hash (getId ());
384
- }
385
-
386
- @ Override
387
- public String toString () {
388
- return "QueryResult{" +
389
- "id='" + id + '\'' +
390
- '}' ;
391
- }
392
- }
393
-
394
- static class Update {
395
-
396
- private final String id ;
397
-
398
- Update (final String id ) {
399
- this .id = id ;
400
- }
401
-
402
- String getId () {
403
- return this .id ;
404
- }
405
-
406
- @ Override
407
- public boolean equals (Object o ) {
408
- if (this == o ) {
409
- return true ;
410
- }
411
- if (!(o instanceof Update )) {
412
- return false ;
413
- }
414
- Update update = (Update ) o ;
415
- return getId ().equals (update .getId ());
416
- }
417
-
418
- @ Override
419
- public int hashCode () {
420
- return Objects .hash (getId ());
421
- }
422
- }
358
+ record Update (String id ) {}
423
359
424
360
}
0 commit comments