Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose printDirective function to enable schema sharding #3822

Merged
merged 1 commit into from
Apr 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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