NOTE: This is a work in progress and not yet ready for real use.
🍃 Lightweight GraphQL client which combines Rollup build-time parsing, transforming, and tree-shaking of queries, and run-time client-side network requests. The goal is to have the most lightweight and performant GraphQL client run-time.
Similar projects:
- https://github.com/prisma/graphql-request
- https://github.com/octokit/graphql.js
- https://github.com/apollographql/graphql-tag
Install:
yarn add graphql-lite graphql
Setup in rollup.config.js
:
import { graphql } from 'graphql-lite';
export default {
plugins: [graphql()],
};
Use:
import { parse, request } from 'graphql-lite';
// TODO: Add usage example
TODO: Add note about this package using native fetch
and how to add a polyfill for old browser and node compatibility.
yarn add isomorphic-unfetch
TODO: Add note that is very old browser support is required, you need to also polyfill Promise
.
See CHANGELOG.
graphql-lite
is an Apache-2.0 licensed open source project. See LICENCE.
© 2018 We Are Genki