Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BonFire does not contain Collection #127

Open
VolodymyrPavlichenko opened this issue Oct 12, 2021 · 1 comment
Open

BonFire does not contain Collection #127

VolodymyrPavlichenko opened this issue Oct 12, 2021 · 1 comment
Labels
bonfire-migration Issues linked to ZenPub to Bonfire migration

Comments

@VolodymyrPavlichenko
Copy link
Collaborator

Linked with Asses ZenPub replacement with BonFire #121

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

query editCollectionData($collectionId: String!) {
    collection(collectionId: $collectionId) {
        ...EditCollectionQueryData
    }
}
fragment EditCollectionQueryData on Collection {
  id
  name
  summary
  icon{
 id, url }

  updatedAt
}
query collectionPreview($collectionId: String!) {
  collection(collectionId:$collectionId){
    id
  ...CollectionPreview
  }
}
fragment CollectionPreview on Collection {
  id
  icon{ id, url }
  isLocal
  canonicalUrl
  name
  summary
  resourceCount
  displayUsername
  myFlag { id }
  myFollow { id }
  preferredUsername
  # myLike { id }
  # likerCount
  community {
    id
    ...CommunityInfo
  }
}
query collectionData($collectionId:String!){
  collection(collectionId:$collectionId){
    ...CollectionPageData
  }
}
fragment CollectionPageData on Collection {
  name
  ...HeroCollectionData
}
query collectionResources($collectionId: String!, $limit:Int, $before:[Cursor!], $after:[Cursor!]) {
  collection(collectionId:$collectionId) @connection(key: "collectionResources", filter: ["collectionId"]){
    id
    resources(limit:$limit, before:$before, after:$after){
      totalCount,
      pageInfo{ ...FullPageInfo }
      edges{
        ...CollectionResource
      }
    }
  }
}
fragment CollectionResource on Resource{
  ...CollectionPageResource
}
query collectionFollowers($collectionId: String!, $limit:Int, $before:[Cursor!], $after:[Cursor!]) {
  collection(collectionId:$collectionId) @connection(key: "collectionFollowers", filter: ["collectionId"]){
    id
    followers(limit:$limit, before:$before, after:$after){
      totalCount,
      pageInfo{ ...FullPageInfo }
      edges{
        id
        creator{
          ...CollectionFollower
        }
      }
    }
  }
}
fragment CollectionFollower on User {
  ...UserPreview
}
query collectionOutboxActivities($collectionId: String!, $limit:Int, $before:[Cursor!], $after:[Cursor!]) {
  collection(collectionId:$collectionId) @connection(key: "collectionOutboxActivities", filter: ["collectionId"]){
    id
    outbox(limit:$limit, before:$before, after:$after){
      totalCount,
      pageInfo{ ...FullPageInfo }
      edges{
        ...CollectionOutboxActivity
      }
    }
  }
}
fragment CollectionOutboxActivity on Activity {
  ...ActivityPreview
}
@VolodymyrPavlichenko
Copy link
Collaborator Author

user, me, like, Activity, Collection, Community

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bonfire-migration Issues linked to ZenPub to Bonfire migration
Projects
None yet
Development

No branches or pull requests

2 participants