Skip to content

Commit cfe45e1

Browse files
tomgassonyaacovCR
authored andcommitted
Expose printDirective function to enable schema sharding (#3822)
1 parent 1d9d159 commit cfe45e1

3 files changed

Lines changed: 4 additions & 1 deletion

File tree

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,8 @@ export {
428428
printSchema,
429429
// Print a GraphQLType to GraphQL Schema language.
430430
printType,
431+
// Print a GraphQLDirective to GraphQL Schema language.
432+
printDirective,
431433
// Prints the built-in introspection schema in the Schema Language format.
432434
printIntrospectionSchema,
433435
// 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
@@ -268,7 +268,7 @@ function printInputValue(arg: GraphQLInputField): string {
268268
return argDecl + printDeprecated(arg.deprecationReason);
269269
}
270270

271-
function printDirective(directive: GraphQLDirective): string {
271+
export function printDirective(directive: GraphQLDirective): string {
272272
return (
273273
printDescription(directive) +
274274
'directive @' +

0 commit comments

Comments
 (0)