Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions src/main/java/graphql/execution/DataFetcherResult.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
*/
@PublicApi
@NullMarked
public class DataFetcherResult<T> {
public class DataFetcherResult<T extends @Nullable Object> {

private final @Nullable T data;
private final List<GraphQLError> errors;
Expand Down Expand Up @@ -144,9 +144,9 @@ public boolean equals(Object o) {

DataFetcherResult<?> that = (DataFetcherResult<?>) o;
return Objects.equals(data, that.data)
&& errors.equals(that.errors)
&& Objects.equals(localContext, that.localContext)
&& Objects.equals(extensions, that.extensions);
&& errors.equals(that.errors)
&& Objects.equals(localContext, that.localContext)
&& Objects.equals(extensions, that.extensions);
}

@Override
Expand All @@ -157,11 +157,11 @@ public int hashCode() {
@Override
public String toString() {
return "DataFetcherResult{" +
"data=" + data +
", errors=" + errors +
", localContext=" + localContext +
", extensions=" + extensions +
'}';
"data=" + data +
", errors=" + errors +
", localContext=" + localContext +
", extensions=" + extensions +
'}';
}

/**
Expand All @@ -175,7 +175,7 @@ public static <T> Builder<T> newResult() {
return new Builder<>();
}

public static class Builder<T> {
public static class Builder<T extends @Nullable Object> {
private @Nullable T data;
private @Nullable Object localContext;
private final List<GraphQLError> errors = new ArrayList<>();
Expand Down
Loading