From eca1dc8e662491b0266029883493ea681b335256 Mon Sep 17 00:00:00 2001 From: Liyas Thomas Date: Tue, 19 Nov 2019 08:55:57 +0530 Subject: [PATCH] Moved Cocs section to right sidebar (will fix overflow issue later today) + Basic lint --- components/graphql/field.vue | 17 +++- components/graphql/type.vue | 6 +- pages/graphql.vue | 182 ++++++++++++++++++++++------------- 3 files changed, 128 insertions(+), 77 deletions(-) diff --git a/components/graphql/field.vue b/components/graphql/field.vue index 144b1dcd5..971c9eddb 100644 --- a/components/graphql/field.vue +++ b/components/graphql/field.vue @@ -36,12 +36,19 @@ export default { computed: { fieldString() { const args = (this.gqlField.args || []).reduce((acc, arg, index) => { - return acc + `${arg.name}: ${arg.type.toString()}${(index !== this.gqlField.args.length - 1) ? ", " : ''}`; - }, ''); - const argsString = (args.length > 0) ? `(${args})` : ''; + return ( + acc + + `${arg.name}: ${arg.type.toString()}${ + index !== this.gqlField.args.length - 1 ? ", " : "" + }` + ); + }, ""); + const argsString = args.length > 0 ? `(${args})` : ""; - return `${this.gqlField.name}${argsString}: ${this.gqlField.type.toString()}`; + return `${ + this.gqlField.name + }${argsString}: ${this.gqlField.type.toString()}`; } } -} +}; diff --git a/components/graphql/type.vue b/components/graphql/type.vue index 44c0ed74a..383267215 100644 --- a/components/graphql/type.vue +++ b/components/graphql/type.vue @@ -1,8 +1,8 @@