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 5151import org .springframework .graphql .data .pagination .ConnectionFieldTypeVisitor ;
5252import org .springframework .graphql .data .pagination .CursorEncoder ;
5353import org .springframework .graphql .data .pagination .CursorStrategy ;
54+ import org .springframework .graphql .data .pagination .EncodingCursorStrategy ;
5455import org .springframework .graphql .data .query .ScrollPositionCursorStrategy ;
5556import org .springframework .graphql .data .query .SliceConnectionAdapter ;
5657import org .springframework .graphql .data .query .WindowConnectionAdapter ;
@@ -170,7 +171,7 @@ static class GraphQlDataAutoConfiguration {
170171
171172 @ Bean
172173 @ ConditionalOnMissingBean
173- CursorStrategy <ScrollPosition > cursorStrategy () {
174+ EncodingCursorStrategy <ScrollPosition > cursorStrategy () {
174175 return CursorStrategy .withEncoder (new ScrollPositionCursorStrategy (), CursorEncoder .base64 ());
175176 }
176177
Original file line number Diff line number Diff line change 4444import org .springframework .core .io .ClassPathResource ;
4545import org .springframework .graphql .ExecutionGraphQlService ;
4646import org .springframework .graphql .data .method .annotation .support .AnnotatedControllerConfigurer ;
47- import org .springframework .graphql .data .pagination .CursorStrategy ;
4847import org .springframework .graphql .data .pagination .EncodingCursorStrategy ;
4948import org .springframework .graphql .execution .BatchLoaderRegistry ;
5049import org .springframework .graphql .execution .DataFetcherExceptionResolver ;
@@ -65,14 +64,11 @@ class GraphQlAutoConfigurationTests {
6564
6665 @ Test
6766 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 ));
7672 }
7773
7874 @ Test
You can’t perform that action at this time.
0 commit comments