import { createDuck } from 'redux-duck'
import { fromJS, List } from 'immutable'
import gql from '../util/GraphQL'

const articleList = createDuck('articleList');

// Action Types
//

const LOAD = articleList.defineType('LOAD');

// Action creators
//

export const load = () => dispatch =>
  gql`{
    ListArticles {
      edges {
        node {
          id
          text
        }
      }
    }
  }`().then((resp) => {
    dispatch(articleList.createAction(LOAD)(resp.getIn(['data', 'ListArticles', 'edges'], List()).map(edge => edge.get('node'))));
  })

// Reducer
//

const initialState = fromJS({
  state: {isLoading: false},
  data: null,
});

export default articleList.createReducer({
  [LOAD]: (state, {payload}) => state.set('data', payload),
}, initialState)

import { createDuck } from 'redux-duck'
import { fromJS } from 'immutable'
import gql from '../util/GraphQL'

const articleList = createDuck('articleList');

// Action Types
//

const LOAD = articleList.defineType('LOAD');

// Action creators
//

export const load = () => dispatch =>
  gql`{
    ListArticles {
      id
      text
    }
  }`().then((resp) => {
    dispatch(articleList.createAction(LOAD)(resp.getIn(['data', 'ListArticles'])));
  })

// Reducer
//

const initialState = fromJS({
  state: {isLoading: false},
  data: null,
});

export default articleList.createReducer({
  [LOAD]: (state, {payload}) => state.set('data', payload),
}, initialState)

--- 
+++ 
@@ -1,5 +1,5 @@
 import { createDuck } from 'redux-duck'
-import { fromJS } from 'immutable'
+import { fromJS, List } from 'immutable'
 import gql from '../util/GraphQL'
 
 const articleList = createDuck('articleList');
@@ -15,11 +15,15 @@
 export const load = () => dispatch =>
   gql`{
     ListArticles {
-      id
-      text
+      edges {
+        node {
+          id
+          text
+        }
+      }
     }
   }`().then((resp) => {
-    dispatch(articleList.createAction(LOAD)(resp.getIn(['data', 'ListArticles'])));
+    dispatch(articleList.createAction(LOAD)(resp.getIn(['data', 'ListArticles', 'edges'], List()).map(edge => edge.get('node'))));
   })
 
 // Reducer
Fix article list API call