55import graphql .annotations .annotationTypes .GraphQLDataFetcher ;
66import graphql .annotations .annotationTypes .GraphQLField ;
77import graphql .annotations .connection .exceptions .GraphQLConnectionException ;
8- import graphql .annotations .connection .simple .*;
8+ import graphql .annotations .connection .simple .GraphQLSimpleConnection ;
9+ import graphql .annotations .connection .simple .SimplePaginatedData ;
10+ import graphql .annotations .connection .simple .SimplePaginatedDataImpl ;
911import graphql .annotations .processor .GraphQLAnnotations ;
1012import graphql .schema .DataFetcher ;
1113import graphql .schema .DataFetchingEnvironment ;
@@ -93,7 +95,7 @@ public Obj(String id, String val) {
9395
9496 public static class TestConnectionOnField {
9597 @ GraphQLField
96- @ GraphQLConnection ( connectionFetcher = SimplePaginatedDataConnectionFetcher . class , connectionType = SimpleRelay . class , validator = SimplePaginatedDataConnectionTypeValidator . class )
98+ @ GraphQLSimpleConnection
9799 public SimplePaginatedData <Obj > objs ;
98100
99101 public TestConnectionOnField (List <Obj > objs ) {
@@ -103,7 +105,7 @@ public TestConnectionOnField(List<Obj> objs) {
103105
104106 public static class TestConnectionNotGoodReturnType {
105107 @ GraphQLField
106- @ GraphQLConnection ( connectionFetcher = SimplePaginatedDataConnectionFetcher . class , connectionType = SimpleRelay . class , validator = SimplePaginatedDataConnectionTypeValidator . class )
108+ @ GraphQLSimpleConnection
107109 @ GraphQLDataFetcher (ObjsSimpleConnectionFetcher .class )
108110 public List <Obj > objs ;
109111
@@ -114,7 +116,7 @@ public TestConnectionNotGoodReturnType(List<Obj> objs) {
114116
115117 public static class MainConnection {
116118 @ GraphQLField
117- @ GraphQLConnection ( connectionFetcher = SimplePaginatedDataConnectionFetcher . class , connectionType = SimpleRelay . class , validator = SimplePaginatedDataConnectionTypeValidator . class )
119+ @ GraphQLSimpleConnection
118120 @ GraphQLDataFetcher (ObjsSimpleConnectionFetcher .class )
119121 public SimplePaginatedData <Obj > objs ;
120122 }
0 commit comments