From 5f5a3535feb27184b5c84a7b9eb1f17de5d196dc Mon Sep 17 00:00:00 2001 From: Trevor Blades Date: Fri, 27 Mar 2020 13:46:13 -0700 Subject: [PATCH] Make capital and currency nullable --- index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 5804872..e64a146 100644 --- a/index.js +++ b/index.js @@ -15,8 +15,8 @@ const typeDefs = gql` native: String! phone: String! continent: Continent! - capital: String! - currency: String! + capital: String + currency: String languages: [Language!]! emoji: String! emojiU: String! @@ -48,6 +48,8 @@ const typeDefs = gql` const resolvers = { Country: { + capital: country => country.capital || null, + currency: country => country.currency || null, continent({continent}) { return { code: continent,