Skip to content

Commit ff54195

Browse files
printSchema: replace array concat with spead + update comment (#3035)
1 parent 264f758 commit ff54195

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/utilities/printSchema.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ function printFilteredSchema(
5858
const directives = schema.getDirectives().filter(directiveFilter);
5959
const types = Object.values(schema.getTypeMap()).filter(typeFilter);
6060

61-
return [printSchemaDefinition(schema)]
62-
.concat(
63-
directives.map((directive) => printDirective(directive)),
64-
types.map((type) => printType(type)),
65-
)
61+
return [
62+
printSchemaDefinition(schema),
63+
...directives.map((directive) => printDirective(directive)),
64+
...types.map((type) => printType(type)),
65+
]
6666
.filter(Boolean)
6767
.join('\n\n');
6868
}
@@ -100,6 +100,7 @@ function printSchemaDefinition(schema: GraphQLSchema): ?string {
100100
* schema {
101101
* query: Query
102102
* mutation: Mutation
103+
* subscription: Subscription
103104
* }
104105
*
105106
* When using this naming convention, the schema description can be omitted.

0 commit comments

Comments
 (0)