@genql/example-shit
v1.0.0
Published
Graphql client
Downloads
2
Readme
@genql/example-shit
Your awesome graphql client ❤️
Example usage
import { createClient } from '@genql/example-shit'
const client = createClient()
client
.query({
Currency: {
_id: true,
symbol: true,
},
})
.then(x => console.log(JSON.stringify(x, null, 4)))
// variables
var Country__shortestPathToOtherCountry__otherCountryAlpha2Code
client
.query({
DistanceToOtherCountry: {
_id: true,
},
Country: {
nameTranslations: {
_id: true,
languageCode: true,
value: true,
},
timezones: {
countries: {
capital: true,
demonym: true,
name: true,
nativeName: true,
numericCode: true,
},
name: true,
},
borders: {
_id: true,
alpha3Code: true,
gini: true,
numericCode: true,
},
officialLanguages: {
countries: {
_id: true,
alpha2Code: true,
alpha3Code: true,
area: true,
capital: true,
populationDensity: true,
gini: true,
name: true,
nativeName: true,
population: true,
},
iso639_1: true,
iso639_2: true,
nativeName: true,
},
distanceToOtherCountries: {
countryName: true,
_id: true,
},
alpha2Code: true,
alpha3Code: true,
capital: true,
populationDensity: true,
demonym: true,
gini: true,
name: true,
nativeName: true,
population: true,
},
Timezone: {
name: true,
},
Currency: {
countries: {
shortestPathToOtherCountry: [
{
otherCountryAlpha2Code: Country__shortestPathToOtherCountry__otherCountryAlpha2Code,
},
{
flag: {
_id: true,
svgFile: true,
},
convertedArea: {
value: true,
unit: true,
populationDensity: true,
},
nameTranslations: {
languageCode: true,
value: true,
},
callingCodes: {
_id: true,
},
alternativeSpellings: {
name: true,
},
timezones: {
_id: true,
},
subregion: {
_id: true,
name: true,
},
distanceToOtherCountries: {
distanceInKm: true,
countryName: true,
},
shortestPathToOtherCountry: [
{
otherCountryAlpha2Code: Country__shortestPathToOtherCountry__otherCountryAlpha2Code,
},
{
alpha3Code: true,
area: true,
capital: true,
nameTranslation: true,
nativeName: true,
numericCode: true,
population: true,
},
],
_id: true,
capital: true,
gini: true,
name: true,
nativeName: true,
numericCode: true,
population: true,
},
],
location: {
x: true,
y: true,
longitude: true,
crs: true,
srid: true,
},
nameTranslations: {
languageCode: true,
value: true,
},
callingCodes: {
_id: true,
name: true,
},
officialLanguages: {
countries: {
_id: true,
alpha2Code: true,
alpha3Code: true,
area: true,
populationDensity: true,
demonym: true,
gini: true,
name: true,
nameTranslation: true,
nativeName: true,
population: true,
},
iso639_2: true,
name: true,
nativeName: true,
},
alpha2Code: true,
alpha3Code: true,
area: true,
nameTranslation: true,
nativeName: true,
numericCode: true,
},
},
Translation: {
value: true,
},
Flag: {
_id: true,
emoji: true,
svgFile: true,
},
TopLevelDomain: {
name: true,
},
CallingCode: {
countries: {
_id: true,
alpha2Code: true,
alpha3Code: true,
area: true,
capital: true,
populationDensity: true,
demonym: true,
gini: true,
nameTranslation: true,
numericCode: true,
},
name: true,
},
})
.then(x => console.log(JSON.stringify(x, null, 4)))
client
.query({
Flag: {
_id: true,
emoji: true,
svgFile: true,
},
})
.then(x => console.log(JSON.stringify(x, null, 4)))
client
.query({
Flag: {
emoji: true,
emojiUnicode: true,
svgFile: true,
},
})
.then(x => console.log(JSON.stringify(x, null, 4)))