55import graphql .annotations .annotationTypes .GraphQLDataFetcher ;
66import graphql .annotations .annotationTypes .GraphQLField ;
77import graphql .annotations .connection .exceptions .GraphQLConnectionException ;
8- import graphql .annotations .connection .simple .GraphQLSimpleConnection ;
9- import graphql .annotations .connection .simple .SimplePaginatedData ;
10- import graphql .annotations .connection .simple .SimplePaginatedDataImpl ;
8+ import graphql .annotations .connection .simple .*;
119import graphql .annotations .processor .GraphQLAnnotations ;
1210import graphql .schema .DataFetcher ;
1311import graphql .schema .DataFetchingEnvironment ;
@@ -95,7 +93,7 @@ public Obj(String id, String val) {
9593
9694 public static class TestConnectionOnField {
9795 @ GraphQLField
98- @ GraphQLSimpleConnection
96+ @ GraphQLConnection ( connectionFetcher = SimplePaginatedDataConnectionFetcher . class , validator = SimplePaginatedDataConnectionTypeValidator . class , connectionType = SimpleRelay . class )
9997 public SimplePaginatedData <Obj > objs ;
10098
10199 public TestConnectionOnField (List <Obj > objs ) {
@@ -105,7 +103,7 @@ public TestConnectionOnField(List<Obj> objs) {
105103
106104 public static class TestConnectionNotGoodReturnType {
107105 @ GraphQLField
108- @ GraphQLSimpleConnection
106+ @ GraphQLConnection ( connectionFetcher = SimplePaginatedDataConnectionFetcher . class , validator = SimplePaginatedDataConnectionTypeValidator . class , connectionType = SimpleRelay . class )
109107 @ GraphQLDataFetcher (ObjsSimpleConnectionFetcher .class )
110108 public List <Obj > objs ;
111109
@@ -116,7 +114,7 @@ public TestConnectionNotGoodReturnType(List<Obj> objs) {
116114
117115 public static class MainConnection {
118116 @ GraphQLField
119- @ GraphQLSimpleConnection
117+ @ GraphQLConnection ( connectionFetcher = SimplePaginatedDataConnectionFetcher . class , validator = SimplePaginatedDataConnectionTypeValidator . class , connectionType = SimpleRelay . class )
120118 @ GraphQLDataFetcher (ObjsSimpleConnectionFetcher .class )
121119 public SimplePaginatedData <Obj > objs ;
122120 }
0 commit comments