Skip to content
Discussion options

You must be logged in to vote

I ended up using lazy query.

const [loadData, { called, loading, data }] = useLazyQuery(ALL_DATA_QUERY, {
    notifyOnNetworkStatusChange: true
  });
const columns = React.useMemo(
    () => [
      {
        Header: 'orders',
        columns: [
          {
            Header: 'ID',
            accessor: 'mainorder',
            canSort: true
          }
        ],
      }
    ],
    []
  )
  const fetchIdRef = React.useRef(0)

  const fetchData = React.useCallback(({ pageSize, pageIndex, sortBy }) => {
    const fetchId = ++fetchIdRef.current
    if (fetchId === fetchIdRef.current) {
      const startRow = pageSize * pageIndex
      const stringCursor = "arrayconnection:" + (startRow-1)
…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by pszafer
Comment options

You must be logged in to vote
1 reply
@pszafer
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants