From a07493b3e4b39537bf2902d9f846418487bea7c3 Mon Sep 17 00:00:00 2001 From: Nick Raienko Date: Wed, 8 Jul 2015 13:01:25 +0300 Subject: [PATCH 1/2] Make trail comma placement more consistent --- src/__tests__/starWarsSchema.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/__tests__/starWarsSchema.js b/src/__tests__/starWarsSchema.js index b479044db5..9b6c06b4b3 100644 --- a/src/__tests__/starWarsSchema.js +++ b/src/__tests__/starWarsSchema.js @@ -134,7 +134,7 @@ var characterInterface = new GraphQLInterfaceType({ return droidType; } return null; - }, + } }); /** @@ -215,7 +215,7 @@ var droidType = new GraphQLObjectType({ primaryFunction: { type: GraphQLString, description: 'The primary function of the droid.' - } + }, }), interfaces: [characterInterface] }); @@ -250,7 +250,7 @@ var queryType = new GraphQLObjectType({ type: droidType, args: {id: { name: 'id', type: new GraphQLNonNull(GraphQLString)}}, resolve: (root, {id}) => starWarsData.Droids[id] - } + }, }) }); From f1cc22819d43989a08cf34f01bf6183f307c46cf Mon Sep 17 00:00:00 2001 From: Nick Raienko Date: Wed, 8 Jul 2015 13:05:57 +0300 Subject: [PATCH 2/2] Extra commas --- src/__tests__/starWarsSchema.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/__tests__/starWarsSchema.js b/src/__tests__/starWarsSchema.js index 9b6c06b4b3..5b60db71b5 100644 --- a/src/__tests__/starWarsSchema.js +++ b/src/__tests__/starWarsSchema.js @@ -80,15 +80,15 @@ var episodeEnum = new GraphQLEnumType({ values: { NEWHOPE: { value: 4, - description: 'Released in 1977.' + description: 'Released in 1977.', }, EMPIRE: { value: 5, - description: 'Released in 1980.' + description: 'Released in 1980.', }, JEDI: { value: 6, - description: 'Released in 1983.' + description: 'Released in 1983.', }, } }); @@ -114,7 +114,7 @@ var characterInterface = new GraphQLInterfaceType({ }, name: { type: GraphQLString, - description: 'The name of the character.' + description: 'The name of the character.', }, friends: { type: new GraphQLList(characterInterface), @@ -123,8 +123,8 @@ var characterInterface = new GraphQLInterfaceType({ }, appearsIn: { type: new GraphQLList(episodeEnum), - description: 'Which movies they appear in.' - } + description: 'Which movies they appear in.', + }, }), resolveType: (obj) => { if (starWarsData.Humans[obj.id] !== undefined) { @@ -168,11 +168,11 @@ var humanType = new GraphQLObjectType({ }, appearsIn: { type: new GraphQLList(episodeEnum), - description: 'Which movies they appear in.' + description: 'Which movies they appear in.', }, homePlanet: { type: GraphQLString, - description: 'The home planet of the human, or null if unknown.' + description: 'The home planet of the human, or null if unknown.', }, }), interfaces: [characterInterface] @@ -200,7 +200,7 @@ var droidType = new GraphQLObjectType({ }, name: { type: GraphQLString, - description: 'The name of the droid.' + description: 'The name of the droid.', }, friends: { type: new GraphQLList(characterInterface), @@ -210,11 +210,11 @@ var droidType = new GraphQLObjectType({ }, appearsIn: { type: new GraphQLList(episodeEnum), - description: 'Which movies they appear in.' + description: 'Which movies they appear in.', }, primaryFunction: { type: GraphQLString, - description: 'The primary function of the droid.' + description: 'The primary function of the droid.', }, }), interfaces: [characterInterface] @@ -244,12 +244,12 @@ var queryType = new GraphQLObjectType({ human: { type: humanType, args: {id: { name: 'id', type: new GraphQLNonNull(GraphQLString)}}, - resolve: (root, {id}) => starWarsData.Humans[id] + resolve: (root, {id}) => starWarsData.Humans[id], }, droid: { type: droidType, args: {id: { name: 'id', type: new GraphQLNonNull(GraphQLString)}}, - resolve: (root, {id}) => starWarsData.Droids[id] + resolve: (root, {id}) => starWarsData.Droids[id], }, }) });