sibelius
8/20/2017 - 6:55 PM

UserListRefetchContainer

UserListRefetchContainer

const UserListRefetchContainer = createRefetchContainer(
  UserList,
  {
    viewer: graphql.experimental`
      fragment UserList_viewer on Viewer @argumentDefinitions(
         count: { type: "Int", defaultValue: 10 }
          cursor: { type: "String" }
      ) {
        users(first: $count, after: $cursor) {
          edges {
            node {            
              _id
              name
              email
            }
          }
        }
      }
    `,
  },
  graphql.experimental`
    query UserListRefetchQuery(
      $count: Int
      $cursor: String    
    ) {
      viewer {
        ...UserList_viewer @arguments(count: $count, cursor: $cursor)
      }
    }
  `,
);