Files
countries/schema.graphql
Trevor Blades ee4c0f0693 Reorder schema
2022-02-11 12:04:06 -08:00

64 lines
1.1 KiB
GraphQL

type Country @key(fields: "code") {
code: ID!
name: String!
native: String!
phone: String!
continent: Continent!
capital: String
currency: String
languages: [Language!]!
emoji: String!
emojiU: String!
states: [State!]!
}
type Continent @key(fields: "code") {
code: ID!
name: String!
countries: [Country!]!
}
type Language @key(fields: "code") {
code: ID!
name: String
native: String
rtl: Boolean!
}
type State {
code: String
name: String!
country: Country!
}
input StringQueryOperatorInput {
eq: String
ne: String
in: [String]
nin: [String]
regex: String
glob: String
}
input CountryFilterInput {
code: StringQueryOperatorInput
currency: StringQueryOperatorInput
continent: StringQueryOperatorInput
}
input ContinentFilterInput {
code: StringQueryOperatorInput
}
input LanguageFilterInput {
code: StringQueryOperatorInput
}
type Query {
countries(filter: CountryFilterInput): [Country!]!
country(code: ID!): Country
continents(filter: ContinentFilterInput): [Continent!]!
continent(code: ID!): Continent
languages(filter: LanguageFilterInput): [Language!]!
language(code: ID!): Language
}