1.0.0 • Published 4 years ago

@genql/example___ v1.0.0

Weekly downloads
1
License
-
Repository
-
Last release
4 years ago

@genql/example___

Your awesome graphql client ❤️

Example usage

import { createClient } from '@genql/example___'
const client = createClient()



client
  .query({
    Subregion: {
      _id: 1,
      name: 1,
    },
  })
  .then(x => console.log(JSON.stringify(x, null, 4)))




client
  .query({
    DistanceToOtherCountry: {
      _id: 1,
    },
  })
  .then(x => console.log(JSON.stringify(x, null, 4)))




client
  .query({
    Flag: {
      emojiUnicode: 1,
      svgFile: 1,
    },
  })
  .then(x => console.log(JSON.stringify(x, null, 4)))




client
  .query({
    Flag: {
      emoji: 1,
      emojiUnicode: 1,
      svgFile: 1,
    },
    Language: {
      countries: {
        _id: 1,
        capital: 1,
        demonym: 1,
        name: 1,
        nativeName: 1,
        numericCode: 1,
      },
      _id: 1,
      name: 1,
      nativeName: 1,
    },
    Translation: {
      _id: 1,
      value: 1,
    },
    CallingCode: {
      countries: {
        alpha3Code: 1,
        area: 1,
        capital: 1,
        demonym: 1,
        gini: 1,
        nameTranslation: 1,
        numericCode: 1,
      },
    },
  })
  .then(x => console.log(JSON.stringify(x, null, 4)))