Make GraphQL queries as easy as a fetch request.
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
import { query } from 'wasp-graphql';
query(url, init)
.then(res => res.json())
.then(json => console.log(json));
npm install --save redux-wasp
Save the results of a GraphQL query to Redux state.
// store.js
import { createWaspMiddleware } from 'redux-wasp';
const waspMiddleware = createWaspMiddleware();
const store = createStore(r, p, applyMiddleware(waspMiddleware));
// reducers.js
import { waspGraphqlReducer } from 'redux-wasp';
const reducers = combineReducers({
graphql: waspGraphqlReducer
});
// run query
import { query } from 'redux-wasp';
query(url, init)
.then(res => res.json())
.then(json => console.log(json));
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 our Code of Conduct here.
View it here
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!
Free and Open Source under the MIT License.