We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 547ded6 commit 2a927e3Copy full SHA for 2a927e3
query-planner-js/src/composedSchema/toAPISchema.ts
@@ -22,6 +22,8 @@ export function toAPISchema(schema: GraphQLSchema): GraphQLSchema {
22
return schema.__apiSchema;
23
}
24
25
+ assertValidSchema(schema);
26
+
27
schema = removeInaccessibleElements(schema);
28
29
// TODO: We should get a list of feature names from the schema itself, rather
@@ -39,9 +41,9 @@ export function toAPISchema(schema: GraphQLSchema): GraphQLSchema {
39
41
directives: schemaConfig.directives.filter(isExported),
40
42
});
43
- schema.__apiSchema = apiSchema;
44
+ assertValidSchema(apiSchema);
45
- assertValidSchema(schema);
46
+ schema.__apiSchema = apiSchema;
47
48
return apiSchema;
49
0 commit comments