项目作者: BlackWaspTech

项目描述 :
Make GraphQL queries as easy as a fetch request.
高级语言: JavaScript
项目地址: git://github.com/BlackWaspTech/wasp-graphql.git
创建时间: 2018-09-27T13:34:27Z
项目社区:https://github.com/BlackWaspTech/wasp-graphql

开源协议:MIT License

下载


Wasp GraphQL Micro-Libraries for Node.js and React

contributions welcome
All Contributors
GitHub

wasp-graphql

npm

npm install wasp-graphql

Execute a GraphQL query the same way that you would a fetch request.

Takes a url and an init object as input. Returns a Promise containing the results of the reques

Usage example

  1. import { query } from 'wasp-graphql';
  2. query(url, init)
  3. .then(res => res.json())
  4. .then(json => console.log(json));

Read more about wasp-graphql

redux-wasp

npm

npm install --save redux-wasp

Save the results of a GraphQL query to Redux state.

Usage example

  1. // store.js
  2. import { createWaspMiddleware } from 'redux-wasp';
  3. const waspMiddleware = createWaspMiddleware();
  4. const store = createStore(r, p, applyMiddleware(waspMiddleware));
  5. // reducers.js
  6. import { waspGraphqlReducer } from 'redux-wasp';
  7. const reducers = combineReducers({
  8. graphql: waspGraphqlReducer
  9. });
  10. // run query
  11. import { query } from 'redux-wasp';
  12. query(url, init)
  13. .then(res => res.json())
  14. .then(json => console.log(json));

Read more about redux-wasp

redux-wasp-apollo

Provide integration between redux-wasp and apollo-link-state. Saves the results of an Apollo query to both Apollo State Cache and Redux State.

Read more about redux-wasp.


Code of Conduct

Read our Code of Conduct here.

Changelog

View it here

How to Contribute

Read more

Contributors

Thanks goes to these wonderful people:


Denny Temple


Reynolds A Colon


kamo31


marceca

This project follows the all-contributors specification. Contributions of any kind welcome!


License

Free and Open Source under the MIT License.


Navigate to wasp-graphql

Navigate to redux-wasp

Navigate to redux-wasp-apollo