1.1.9 • Published 3 years ago

@saltyaom/gq v1.1.9

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

@saltyaom/gq

Light version of @saltyaom/gql at 500 bytes.

Feature

  • No dependencies.
  • GraphQL at bare minimum.
  • Supports on both client and server.
  • Minify query on flies
  • Built-in TypeScript

Size

Should be around 500 bytes, checkout Bundlephobia for accurate result.

Getting start

yarn add @saltyaom/gq

// Or npm
npm install @saltyaom/gq --save

Example

import gql, { client } from '@saltyaom/gq'

client.config('http://api.opener.studio/graphql')

gql(`
  query GetHentaiById($id: Int!) {
    getHentaiById(id: $id) {
      success
      data {
        title {
          display
        }
      }
    }
  }
`,
{
  variables: {
    id: 177013
  }
}).then((data) => console.log(data))

Why

Y'll made GraphQL too complex and heavy.

I just want to fetch GraphQL query here.

Example

import gql, { client } from '@saltyaom/gq'

client.config('http://api.opener.studio/graphql')

gql(`
  query GetHentaiById($id: Int!) {
    getHentaiById(id: $id) {
      success
      data {
        title {
          display
        }
      }
    }
  }
`,
{
  variables: {
    id: 177013
  }
}).then((data) => console.log(data))
1.1.9

3 years ago

1.1.8

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.1

3 years ago