Skip to content

Commit

Permalink
Expose printDirective function to enable schema sharding (#3822)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomgasson authored Apr 18, 2023
1 parent e581cc6 commit d45e48b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,8 @@ export {
printSchema,
// Print a GraphQLType to GraphQL Schema language.
printType,
// Print a GraphQLDirective to GraphQL Schema language.
printDirective,
// Prints the built-in introspection schema in the Schema Language format.
printIntrospectionSchema,
// Create a GraphQLType from a GraphQL language AST.
Expand Down
1 change: 1 addition & 0 deletions src/utilities/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export { lexicographicSortSchema } from './lexicographicSortSchema.js';
export {
printSchema,
printType,
printDirective,
printIntrospectionSchema,
} from './printSchema.js';

Expand Down
2 changes: 1 addition & 1 deletion src/utilities/printSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ function printInputValue(arg: GraphQLInputField): string {
return argDecl + printDeprecated(arg.deprecationReason);
}

function printDirective(directive: GraphQLDirective): string {
export function printDirective(directive: GraphQLDirective): string {
return (
printDescription(directive) +
'directive @' +
Expand Down

0 comments on commit d45e48b

Please sign in to comment.