diff --git a/docs/source/schema-directives.md b/docs/source/schema-directives.md index 71ca117cbbf..b4aaf27611b 100644 --- a/docs/source/schema-directives.md +++ b/docs/source/schema-directives.md @@ -15,7 +15,7 @@ This document focuses on `@directive`s that appear in GraphQL _schemas_ written In order for a `@directive` to have any consequences, the GraphQL server must be configured to apply a specific implementation of that `@directive` to the `GraphQLSchema` object. This document describes one possible approach to defining reusable `@directive` implementations, namely the `SchemaDirectiveVisitor` abstraction provided by the `graphql-tools` npm package. -The possible applications of `@directive` syntax are practically limitless: enforcing access permissions, formatting date strings, auto-generating resolver functions for a particular backend API, marking strings for internationalization, synthesizing globally unique object identifiers, specifying caching behavior, skipping or including or deprecating fields, and just about anything else you can imagine. +The possible applications of `@directive` syntax are numerous: enforcing access permissions, formatting date strings, auto-generating resolver functions for a particular backend API, marking strings for internationalization, synthesizing globally unique object identifiers, specifying caching behavior, skipping or including or deprecating fields, and just about anything else you can imagine. ## Simple Directive example diff --git a/src/schemaVisitor.ts b/src/schemaVisitor.ts index 69f72c59506..c9045096728 100644 --- a/src/schemaVisitor.ts +++ b/src/schemaVisitor.ts @@ -41,7 +41,7 @@ const hasOwn = Object.prototype.hasOwnProperty; export abstract class SchemaVisitor { // All SchemaVisitor instances are created while visiting a specific // GraphQLSchema object, so this property holds a reference to that object, - // in case a vistor method needs to refer to this.schema. + // in case a visitor method needs to refer to this.schema. public schema: GraphQLSchema; // Determine if this SchemaVisitor (sub)class implements a particular @@ -119,7 +119,7 @@ export function visitSchema( function callMethod( methodName: string, type: VisitableSchemaType, - ...args: any[], + ...args: any[] ) { visitorSelector(type, methodName).forEach(visitor => { visitor[methodName](type, ...args);