Skip to content

Commit

Permalink
Expose printDirective function
Browse files Browse the repository at this point in the history
  • Loading branch information
tomgasson committed Nov 25, 2022
1 parent 6b5c8af commit b2ead32
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 @@ -430,6 +430,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 @@ -269,7 +269,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 b2ead32

Please sign in to comment.