graphql-sync-h5

1.0.0 • Public • Published

graphql-sync-h5

A simple, modular GraphQL cache for Javascript

Install

npm install graphql-sync-h5

Quickstart

 import * as QL from 'graphql-sync-h5/graphql_cache.core';

 const graphqlEndpoint = 'http://xxx/graphql';

 componentDidMount() {
     // graphql
     console.log(QL.init(graphqlEndpoint));
   }

Usage

import * as QL from "graphql-sync-h5/graphql_cache.core";

export default (options = {collection:'', condition:'', fields: '',}) => {
  console.log("f-many:",options);
  return QL.find_many1(options.collection,options.condition,options.fields).then(res => {
    console.log("many-res:", res);
    return res;
  });
};

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i graphql-sync-h5

      Weekly Downloads

      0

      Version

      1.0.0

      License

      ISC

      Unpacked Size

      7.08 MB

      Total Files

      161

      Last publish

      Collaborators

      • ioobot