mirror of
https://github.com/FranP-code/countries.git
synced 2025-10-13 00:02:15 +00:00
Add queries/resolvers for single assets
This commit is contained in:
36
schema.js
Normal file
36
schema.js
Normal file
@@ -0,0 +1,36 @@
|
||||
import {gql} from 'apollo-server';
|
||||
|
||||
export default gql`
|
||||
type Continent {
|
||||
code: String
|
||||
name: String
|
||||
}
|
||||
|
||||
type Country {
|
||||
code: String
|
||||
name: String
|
||||
native: String
|
||||
phone: String
|
||||
continent: Continent
|
||||
currency: String
|
||||
languages: [Language]
|
||||
emoji: String
|
||||
emojiU: String
|
||||
}
|
||||
|
||||
type Language {
|
||||
code: String
|
||||
name: String
|
||||
native: String
|
||||
rtl: Int
|
||||
}
|
||||
|
||||
type Query {
|
||||
continents: [Continent]
|
||||
continent(code: String): Continent
|
||||
countries: [Country]
|
||||
country(code: String): Country
|
||||
languages: [Language]
|
||||
language(code: String): Language
|
||||
}
|
||||
`;
|
||||
Reference in New Issue
Block a user