1.1.9 • Published 2 years ago

@saltyaom/gq v1.1.9

Weekly downloads
-
License
MIT
Repository
github
Last release
2 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

2 years ago

1.1.8

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.1

3 years ago