Reactjs 我无法执行loadMore,因为hasMore()始终返回false,即使hasNextPage为true?
我不知道为什么我的loadMore不工作,这是我分页中的代码:Reactjs 我无法执行loadMore,因为hasMore()始终返回false,即使hasNextPage为true?,reactjs,graphql,relayjs,relay,Reactjs,Graphql,Relayjs,Relay,我不知道为什么我的loadMore不工作,这是我分页中的代码: todos(first: $count # count is default to 2 ) @connection(key: "TodoList_todos") { # edges { cursor node { id, complete, ...Todo_to
todos(first: $count # count is default to 2
) @connection(key: "TodoList_todos") { #
edges {
cursor
node {
id,
complete,
...Todo_todo,
}
}
pageInfo {
endCursor
hasNextPage
hasPreviousPage
startCursor
}
当hasNextPage返回true时,为什么我的hasMore返回false?我该如何解决这个问题 您正在设置getConnectionFromProps吗? 可能需要像道具一样 module.exports=createPaginationContainer 待办事项, { todos:graphql` todosfirst:$count默认为2 @connectionkey:TodoList_todos{ 边缘{ 光标 节点{ 身份证件 完成 …Todo_Todo, } } 页面信息{ 结束光标 下一页 上一页 startCursor } ` }, { 方向:“前进”, getConnectionFromProps:props=>props.todos, getFragmentVariables:vars,totalCount=>{ …vars, 计数:总计计数, }, getVariables:props,{count,cursor}=>{ 计数 光标 }, 环境:环境,, 查询:graphql` 查询TodosPaginationQuery$count:Int!,$cursor:String{ …商店名单 } ` } ;