graphql-sync-h5
v1.0.0
Published
graphql cache
Downloads
1
Readme
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;
});
};