daily pastebin goal
25%
SHARE
TWEET

Untitled

a guest Oct 11th, 2018 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import {Cmd} from 'redux-loop';
  2.  
  3. import successActions from './success-actions';
  4. import {failNetworkRequest} from './actions';
  5. import type {Operation} from './graphql/types.flow';
  6. import graphqlOperation from './graphql/operation';
  7.  
  8. export const executeGraphqlOperation = ({
  9.   query,
  10.   success,
  11.   variables,
  12.   operationName,
  13.   context,
  14.   extensions
  15. }: Operation) =>
  16.   Cmd.run(graphqlOperation, {
  17.     args: [
  18.       {
  19.         query,
  20.         variables,
  21.         operationName,
  22.         context,
  23.         extensions
  24.       }
  25.     ],
  26.     successActionCreator: successActions[success],
  27.     failActionCreator: failNetworkRequest
  28.   });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top