@sejazipper/layer-api-client

A Node.JS module, which provides an object oriented wrapper for zipper api graphql API.

Usage no npm install needed!

<script type="module">
  import sejazipperLayerApiClient from 'https://cdn.skypack.dev/@sejazipper/layer-api-client';
</script>

README

zipper-layer-client

A Node.JS module, which provides an wrapper for the Zipper Graphql API.

Install

yarn add @sejazipper/layer-api-client

Using

import { createClient, everything } from '@sejazipper/layer-api-client'
const client = createClient()

client
    .query({
        countries: {
            name: true,
            code: true,
            nestedField: {
                ...everything, // same as __scalar: true
            },
        },
    })
    .then(console.log)

Update local dependecy

npx zpp-api build -e http://localhost:4000/graphql

Tools used

Jest - Testing Framework.
Genql - Type safe Graphql Query Builder.