Skip to content

Moumouls/graphql-request

 
 

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

About

Minimal GraphQL client supporting Node and browsers for scripts or simple apps

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 77.0%
  • HTML 22.4%
  • Other 0.6%