1.0.12 • Published 2 years ago

e-graphql-client v1.0.12

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

EGQL

E-GraphQL Client library is the best library to fetch data from backend that run on E-GraphQL Servers. It allows you to easily handle data fetching.

Maintainers

Fetch form the server

import { gql } from 'graphql-request';
import { get } from 'e-graphql-client';

const COUNTRIES_QUERY = gql`
  query {
    country(code: "IN") {
      code
      name
      continent {
        name
      }
    }
  }
`;

const data = await get<{ country: { name: string; code: string } }>(
  'https://countries.trevorblades.com/',
  COUNTRIES_QUERY,
);

API Reference

geturl - The Base URL for the E-GraphQL Server. document - The GraphQL query. variables - Variables used in query (optional). requestHeaders - Headers to be sent to the server (optional).

This documentation is a work in progress.

1.0.11

2 years ago

1.0.10

2 years ago

1.0.12

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago