diff --git a/graphql/src/main/java/com/qwlabs/graphql/relay/Connection.java b/graphql/src/main/java/com/qwlabs/graphql/relay/Connection.java index a8ed709..e1a5d87 100644 --- a/graphql/src/main/java/com/qwlabs/graphql/relay/Connection.java +++ b/graphql/src/main/java/com/qwlabs/graphql/relay/Connection.java @@ -14,13 +14,13 @@ @EqualsAndHashCode public class Connection { @NotNull - private final ImmutableList> edges; + private final ImmutableList<@NotNull Edge> edges; @NotNull private final PageInfo pageInfo; @NotNull private final Long totalCount; - public Connection(List<@NotNull Edge<@NotNull T>> edges, + public Connection(List<@NotNull Edge> edges, PageInfo pageInfo, Long totalCount) { this.edges = ImmutableList.copyOf(Assert.assertNotNull(edges, () -> "edges cannot be null")); diff --git a/graphql/src/main/java/com/qwlabs/graphql/relay/PageInfo.java b/graphql/src/main/java/com/qwlabs/graphql/relay/PageInfo.java index f4b7bb3..8ec60be 100644 --- a/graphql/src/main/java/com/qwlabs/graphql/relay/PageInfo.java +++ b/graphql/src/main/java/com/qwlabs/graphql/relay/PageInfo.java @@ -13,7 +13,9 @@ public class PageInfo { private final String startCursor; @NotNull private final String endCursor; + @NotNull private final boolean hasPreviousPage; + @NotNull private final boolean hasNextPage; public PageInfo(String startCursor, String endCursor,