mirror of
https://github.com/FranP-code/countries.git
synced 2025-10-13 00:02:15 +00:00
64 lines
1.1 KiB
GraphQL
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
|
|
} |