Skip to content

Commit

Permalink
Move public schema member declaration to SchemaVisitor base class.
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamn committed Mar 14, 2018
1 parent 9f22c87 commit 9838718
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/schemaVisitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ const hasOwn = Object.prototype.hasOwnProperty;
// helper function for determining whether a subclass implements a given
// visitor method, as opposed to inheriting one of the stubs defined here.
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.
public schema: GraphQLSchema;

// Determine if this SchemaVisitor (sub)class implements a particular
// visitor method.
public static implementsVisitorMethod(methodName: string) {
Expand Down Expand Up @@ -277,11 +282,6 @@ export class SchemaDirectiveVisitor extends SchemaVisitor {
// the schema. Visitor methods may refer to this object via this.args.
public args: { [name: string]: any };

// All SchemaDirectiveVisitor 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.
public schema: GraphQLSchema;

// A reference to the type object that this visitor was created to visit.
public visitedType: VisitableSchemaType;

Expand Down

0 comments on commit 9838718

Please sign in to comment.