From b0a99679fd960d2557b9300ef4c03e8d4bbf0e97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tunca=20Tun=C3=A7?= Date: Mon, 4 Jun 2018 11:25:15 +0300 Subject: [PATCH] Change technique field to techniques[] --- graphql/PaintingType.js | 4 ++-- models/Painting.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/graphql/PaintingType.js b/graphql/PaintingType.js index 7872a0e..36fe573 100644 --- a/graphql/PaintingType.js +++ b/graphql/PaintingType.js @@ -1,6 +1,6 @@ const graphql = require('graphql'); -const { GraphQLObjectType, GraphQLString } = graphql; +const { GraphQLObjectType, GraphQLString, GraphQLList } = graphql; const PaintingType = new GraphQLObjectType({ name: 'Painting', @@ -8,7 +8,7 @@ const PaintingType = new GraphQLObjectType({ id: { type: GraphQLString }, name: { type: GraphQLString }, url: { type: GraphQLString }, - technique: { type: GraphQLString } + techniques: { type: new GraphQLList(GraphQLString) } }) }); diff --git a/models/Painting.js b/models/Painting.js index 5d0de13..99f1c13 100644 --- a/models/Painting.js +++ b/models/Painting.js @@ -9,7 +9,7 @@ const Schema = mongoose.Schema; const PaintingSchema = new Schema({ name: String, url: String, - technique: String + techniques: [String] }); module.exports = mongoose.model('Painting', PaintingSchema);