File tree Expand file tree Collapse file tree 2 files changed +7
-10
lines changed
spring-boot-project/spring-boot-autoconfigure/src
main/java/org/springframework/boot/autoconfigure/graphql
test/java/org/springframework/boot/autoconfigure/graphql Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change 51
51
import org .springframework .graphql .data .pagination .ConnectionFieldTypeVisitor ;
52
52
import org .springframework .graphql .data .pagination .CursorEncoder ;
53
53
import org .springframework .graphql .data .pagination .CursorStrategy ;
54
+ import org .springframework .graphql .data .pagination .EncodingCursorStrategy ;
54
55
import org .springframework .graphql .data .query .ScrollPositionCursorStrategy ;
55
56
import org .springframework .graphql .data .query .SliceConnectionAdapter ;
56
57
import org .springframework .graphql .data .query .WindowConnectionAdapter ;
@@ -170,7 +171,7 @@ static class GraphQlDataAutoConfiguration {
170
171
171
172
@ Bean
172
173
@ ConditionalOnMissingBean
173
- CursorStrategy <ScrollPosition > cursorStrategy () {
174
+ EncodingCursorStrategy <ScrollPosition > cursorStrategy () {
174
175
return CursorStrategy .withEncoder (new ScrollPositionCursorStrategy (), CursorEncoder .base64 ());
175
176
}
176
177
Original file line number Diff line number Diff line change 44
44
import org .springframework .core .io .ClassPathResource ;
45
45
import org .springframework .graphql .ExecutionGraphQlService ;
46
46
import org .springframework .graphql .data .method .annotation .support .AnnotatedControllerConfigurer ;
47
- import org .springframework .graphql .data .pagination .CursorStrategy ;
48
47
import org .springframework .graphql .data .pagination .EncodingCursorStrategy ;
49
48
import org .springframework .graphql .execution .BatchLoaderRegistry ;
50
49
import org .springframework .graphql .execution .DataFetcherExceptionResolver ;
@@ -65,14 +64,11 @@ class GraphQlAutoConfigurationTests {
65
64
66
65
@ Test
67
66
void shouldContributeDefaultBeans () {
68
- this .contextRunner .run ((context ) -> {
69
- assertThat (context ).hasSingleBean (GraphQlSource .class )
70
- .hasSingleBean (BatchLoaderRegistry .class )
71
- .hasSingleBean (ExecutionGraphQlService .class )
72
- .hasSingleBean (AnnotatedControllerConfigurer .class )
73
- .hasSingleBean (CursorStrategy .class );
74
- assertThat (context .getBean (CursorStrategy .class )).isInstanceOf (EncodingCursorStrategy .class );
75
- });
67
+ this .contextRunner .run ((context ) -> assertThat (context ).hasSingleBean (GraphQlSource .class )
68
+ .hasSingleBean (BatchLoaderRegistry .class )
69
+ .hasSingleBean (ExecutionGraphQlService .class )
70
+ .hasSingleBean (AnnotatedControllerConfigurer .class )
71
+ .hasSingleBean (EncodingCursorStrategy .class ));
76
72
}
77
73
78
74
@ Test
You can’t perform that action at this time.
0 commit comments