reflow-project / weloop

WeLoop is a React/TypeScript client for ZenPub and a key component of ReflowOS
https://weloop.reflowproject.eu
GNU Affero General Public License v3.0
5 stars 5 forks source link

BonFire does not contain Thread #126

Open oksanasalohubova opened 3 years ago

oksanasalohubova commented 3 years ago

Linked with Asses ZenPub replacement with BonFire #121

Thread

We have no way to get Thread in these requests and mutations

fragment ThreadPreview on Thread {
  id
  lastActivity
  createdAt
  context{
    ...on Community {
      ...CommunityPreview
    }
    ...on Collection {
      ...CollectionPreview
    }
    ...on Resource {
      ...ResourcePreview
    }
    ...on Flag {
      ...FlagPreview
    }
  }
  comments(limit:1){
    totalCount
    edges{
     ...on Comment {
          ...CommentPreview
        }
    }
  }
}
fragment CommunityPageThread on Thread {
  id
  ...ThreadPreview
}
query communityThreads($communityId: String!, $limit:Int, $before:[Cursor!], $after:[Cursor!]) {
  community(communityId:$communityId) @connection(key: "communityThreads", filter: ["communityId"]){
    id
    threads(limit:$limit, before:$before, after:$after){
      totalCount,
      pageInfo{ ...FullPageInfo }
      edges{
        ...CommunityThread
      }
    }
  }
}

fragment CommunityThread on Thread{
  ...CommunityPageThread
}
VolodymyrPavlichenko commented 3 years ago
Thread