@@ -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