From ebb619e97ae28b55d68cf832637ab08cb98f1b23 Mon Sep 17 00:00:00 2001 From: Kennet Postigo Date: Sat, 30 Jan 2016 01:21:07 -0500 Subject: [PATCH] quick fix to readme --- README.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b195253..6ef1233 100644 --- a/README.md +++ b/README.md @@ -34,10 +34,12 @@ npm install --save react-reach react-reach makes fetching data from a GraphQL server as easy as this: ```js -//.reachGraphQL() to make a query for some data, or add mutation +//reachGraphQL() to make a query for some data, or add mutation //I created this function with for simply communicating back and forth with graphQL //params: reachGraphQL(url, query/mutation, queryParameters) +import { reachGraphQL } from 'react-reach'; + reachGraphQL('localhost:1000', `{ user(id: "1") { name @@ -45,11 +47,13 @@ reachGraphQL('localhost:1000', `{ }`, {}); -//.reachWithDispatch() to make a query and dispatch actionCreator passed in +//reachWithDispatch() to make a query and dispatch actionCreator passed in //I created this function for receiving data from the server and automatically caching it in the redux store. //To be used with redux-thunk or any similar middleware. //params: reachWithDispatch(url, query/mutation, queryParameters, actionCreator) +import { reachWithDispatch } from 'react-reach'; + reachWithDispatch('localhost:1000', `{ user(id: "1") { name @@ -57,11 +61,14 @@ reachWithDispatch('localhost:1000', `{ }`, {}, somePredefinedActionCreator); -//.reachWithOpts() to make a query and dispatch specified actionCreators from an Object passed in +//reachWithOpts() to make a query and dispatch specified actionCreators from an Object passed in //I created this function for sending data to the server and optimistically updating the redux store client-side //To be used with redux-thunk or any similar middleware. //params: reachWithDispatch(url, query/mutation, queryParameters, actionCreator, store, retry) //Automatically handles updating redux store client-side +//This function is still a WIP not implemented + +import { reachWithOpts } from 'react-reach'; reachWithOpts('localhost:1000', `mutation { CreateUser {