mirror of
https://github.com/FranP-code/countries.git
synced 2025-10-13 00:02:15 +00:00
Added code field on the country resolver
This commit is contained in:
@@ -42,7 +42,11 @@ export default {
|
||||
}));
|
||||
},
|
||||
country(parent, {code}) {
|
||||
return countries[code];
|
||||
const country = countries[code];
|
||||
return {
|
||||
...country,
|
||||
code
|
||||
};
|
||||
},
|
||||
countries() {
|
||||
return Object.entries(countries).map(([code, country]) => ({
|
||||
|
||||
Reference in New Issue
Block a user