mirror of
https://github.com/FranP-code/countries.git
synced 2025-10-13 00:02:15 +00:00
Cast language RTL value as boolean
This commit is contained in:
7
index.js
7
index.js
@@ -44,7 +44,7 @@ const typeDefs = gql`
|
||||
code: LanguageCode
|
||||
name: String
|
||||
native: String
|
||||
rtl: Int
|
||||
rtl: Boolean
|
||||
}
|
||||
|
||||
type Query {
|
||||
@@ -96,6 +96,11 @@ const resolvers = {
|
||||
}));
|
||||
}
|
||||
},
|
||||
Language: {
|
||||
rtl(language) {
|
||||
return Boolean(language.rtl);
|
||||
}
|
||||
},
|
||||
Query: {
|
||||
continent(parent, {code}) {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user