Thanks to visit codestin.com
Credit goes to github.com

Skip to content

graffle-js/graffle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Note

Looking for graphql-request? It's been renamed to Graffle and the old version is available on the graphql-request branch.

Graffle Logo

Graffle

Simple, type-safe GraphQL client for JavaScript.

DocumentationGetting StartedExamples

Installation

npm install graffle@next graphql

Quick Start

import { Graffle } from 'graffle'

const graffle = Graffle
  .create()
  .transport({ url: 'https://countries.trevorblades.com/graphql' })

const data = graffle.gql(`
  query getCountries {
    countries {
      name
      capital
      emoji
      currency
    }
  }

  query getContinents {
    continents {
      name
      code
    }
  }

  query getLanguage {
    language(code: "en") {
      name
      native
    }
  }
`)
  .getCountries()

Learn More

Visit graffle.js.org for full documentation, guides, and examples.

License

MIT