Skip to content

Commit d45e48b

Browse files
authored
Expose printDirective function to enable schema sharding (#3822)
1 parent e581cc6 commit d45e48b

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,8 @@ export {
429429
printSchema,
430430
// Print a GraphQLType to GraphQL Schema language.
431431
printType,
432+
// Print a GraphQLDirective to GraphQL Schema language.
433+
printDirective,
432434
// Prints the built-in introspection schema in the Schema Language format.
433435
printIntrospectionSchema,
434436
// Create a GraphQLType from a GraphQL language AST.

src/utilities/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export { lexicographicSortSchema } from './lexicographicSortSchema.js';
4949
export {
5050
printSchema,
5151
printType,
52+
printDirective,
5253
printIntrospectionSchema,
5354
} from './printSchema.js';
5455

src/utilities/printSchema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ function printInputValue(arg: GraphQLInputField): string {
264264
return argDecl + printDeprecated(arg.deprecationReason);
265265
}
266266

267-
function printDirective(directive: GraphQLDirective): string {
267+
export function printDirective(directive: GraphQLDirective): string {
268268
return (
269269
printDescription(directive) +
270270
'directive @' +

0 commit comments

Comments
 (0)