From 0128a10a63fa96379dd946fd64803b483420f1d1 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Wed, 14 Feb 2018 17:32:33 -0500 Subject: [PATCH] Fix an argument typo in @rest example. --- src/directives.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/directives.ts b/src/directives.ts index a8e3f98864b..77647f9bac6 100644 --- a/src/directives.ts +++ b/src/directives.ts @@ -55,7 +55,7 @@ const hasOwn = Object.prototype.hasOwnProperty; // // const typeDefs = ` // type Query { -// people: [Person] @rest("/api/v1/people") +// people: [Person] @rest(url: "/api/v1/people") // }`; // // const schema = makeExecutableSchema({ typeDefs }); @@ -63,7 +63,7 @@ const hasOwn = Object.prototype.hasOwnProperty; // SchemaDirectiveVisitor.visitSchema(schema, { // rest: class extends SchemaDirectiveVisitor { // visitFieldDefinition(field: GraphQLField) { -// const [url] = this.args; +// const { url } = this.args; // field.resolve = () => fetch(url); // } // }