浏览代码

fix issue with wrong number of follows (#1153)

Bartosz Dryl 3 年之前
父节点
当前提交
f29a59fac9
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/api/client/resolvers.ts

+ 2 - 2
src/api/client/resolvers.ts

@@ -298,14 +298,14 @@ export const queryNodeStitchingResolvers = (
         info
       )
 
-      const followsLookup = createLookup<{ id: string; views: number }>(batchedChannelFollows || [])
+      const followsLookup = createLookup<{ id: string; follows: number }>(batchedChannelFollows || [])
       const viewsLookup = createLookup<{ id: string; views: number }>(batchedChannelViews || [])
 
       return parent.edges.map((edge: ChannelEdge) => ({
         ...edge,
         node: {
           ...edge.node,
-          follows: followsLookup[edge.node.id]?.views || 0,
+          follows: followsLookup[edge.node.id]?.follows || 0,
           views: viewsLookup[edge.node.id]?.views || 0,
         },
       }))