Skip to content

Commit

Permalink
Fixing some typos.
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamn committed Mar 14, 2018
1 parent b5e347f commit 0d659c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/source/schema-directives.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions src/schemaVisitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 0d659c9

Please sign in to comment.