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
|
code: LanguageCode
|
||||||
name: String
|
name: String
|
||||||
native: String
|
native: String
|
||||||
rtl: Int
|
rtl: Boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
type Query {
|
type Query {
|
||||||
@@ -96,6 +96,11 @@ const resolvers = {
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Language: {
|
||||||
|
rtl(language) {
|
||||||
|
return Boolean(language.rtl);
|
||||||
|
}
|
||||||
|
},
|
||||||
Query: {
|
Query: {
|
||||||
continent(parent, {code}) {
|
continent(parent, {code}) {
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user