Skip to content

Commit bd87652

Browse files
authored
Merge pull request #4247 from graphql-java/schema-codregistry-nullable
Remove incorrect @nullable from GraphQLSchema.getCodeRegistry()
2 parents 89b4446 + 3359e8d commit bd87652

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎src/main/java/graphql/schema/GraphQLSchema.java‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,15 @@ public class GraphQLSchema {
6969
private final @Nullable SchemaDefinition definition;
7070
private final ImmutableList<SchemaExtensionDefinition> extensionDefinitions;
7171
private final @Nullable String description;
72-
private final @Nullable GraphQLCodeRegistry codeRegistry;
72+
private final GraphQLCodeRegistry codeRegistry;
7373

7474
private final ImmutableMap<String, GraphQLNamedType> typeMap;
7575
private final ImmutableMap<String, ImmutableList<GraphQLObjectType>> interfaceNameToObjectTypes;
7676
private final ImmutableMap<String, ImmutableList<String>> interfaceNameToObjectTypeNames;
7777

7878
/*
7979
* This constructs partial GraphQL schema object which has the schema (query / mutation / subscription) trees
80-
* in it but it does not have the collected types, code registry nor the type references replaced
80+
* in it but it does not have the collected types, the correct code registry nor the type references replaced
8181
*
8282
* But it can be traversed to discover all that and filled out later via another constructor.
8383
*
@@ -102,7 +102,7 @@ private GraphQLSchema(Builder builder) {
102102
this.extensionDefinitions = nonNullCopyOf(builder.extensionDefinitions);
103103
this.description = builder.description;
104104

105-
this.codeRegistry = null;
105+
this.codeRegistry = builder.codeRegistry;
106106
this.typeMap = ImmutableKit.emptyMap();
107107
this.interfaceNameToObjectTypes = ImmutableKit.emptyMap();
108108
this.interfaceNameToObjectTypeNames = ImmutableKit.emptyMap();
@@ -254,7 +254,7 @@ private static ImmutableMap<String, ImmutableList<String>> buildInterfacesToObje
254254
return map.build();
255255
}
256256

257-
public @Nullable GraphQLCodeRegistry getCodeRegistry() {
257+
public GraphQLCodeRegistry getCodeRegistry() {
258258
return codeRegistry;
259259
}
260260

0 commit comments

Comments
 (0)