mirror of
https://github.com/FranP-code/countries.git
synced 2025-10-13 00:02:15 +00:00
Use netlify functions
This commit is contained in:
1
.netlify/functions-serve/graphql/graphql.js
Normal file
1
.netlify/functions-serve/graphql/graphql.js
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('./src/netlify/functions/graphql/graphql.js')
|
||||
1
.netlify/functions-serve/graphql/package.json
Normal file
1
.netlify/functions-serve/graphql/package.json
Normal file
@@ -0,0 +1 @@
|
||||
{"type":"commonjs"}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
64
.netlify/functions-serve/graphql/src/schema.graphql
Normal file
64
.netlify/functions-serve/graphql/src/schema.graphql
Normal file
@@ -0,0 +1,64 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user