2.0.0 • Published 3 months ago

@ryanccn/gql v2.0.0

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

@ryanccn/gql

A tiny GraphQL querying library.

Installation

$ npm install @ryanccn/gql
$ yarn add @ryanccn/gql
$ pnpm add @ryanccn/gql

Usage

import { createGql } from "@ryanccn/gql";

const gql = createGql("https://countries.trevorblades.com/");

const { success, data } = await gql`
	query {
		continents {
			name
		}
	}
`();

If your GraphQL client is named something else, you can also do

import { createGql } from "@ryanccn/gql";

const gqlClient = createGql("https://countries.trevorblades.com/");

const { success, data } = await gqlClient.gql`
	query {
		continents {
			name
		}
	}
`();

to retain the DX benefits of the gql tag.

License

MIT

2.0.0

3 months ago

1.0.0

10 months ago

0.3.0

10 months ago

0.2.4

10 months ago

0.2.3

11 months ago

0.2.2

12 months ago

0.2.1

12 months ago

0.2.0

12 months ago

0.1.2

12 months ago

0.1.1

12 months ago

0.1.0

12 months ago