Add queries/resolvers for single assets

This commit is contained in:
Trevor Blades
2018-10-11 23:39:44 -04:00
parent febf38a98f
commit 4649d32676
3 changed files with 71 additions and 55 deletions

36
schema.js Normal file
View 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
}
`;