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 Like #134

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

BonFire does not contain Like #134

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

Comments

@oksanasalohubova
Copy link
Collaborator

Linked with Asses ZenPub replacement with BonFire #121

Like

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

fragment LikePreview on Like{
  id
  createdAt
  
  context{
    ...on Community {
      ...CommunityPreview
    }
    ...on Collection {
      ...CollectionPreview
    }
    ...on Resource {
      ...ResourcePreview
    }
    ...on User {
      ...UserPreview
    }
    ...on Comment {
      ...CommentPreview
    }
  }
}
fragment ActivityPreview on Activity {
  id
  verb
  createdAt
  user {
    icon {
      id
      url
    }
    image {
      id
      url
    }
    userId: id
    userName: name
    canonicalUrl
  }
  context {
    ... on Community {
      ...CommunityPreview
    }
    ... on Collection {
      ...CollectionPreview
    }
    ... on Resource {
      ...ResourcePreview
    }
    ... on User {
      ...UserPreview
    }
    ... on Comment {
      ...CommentPreview
    }
    ... on Flag {
      ...FlagPreview
    }
    ... on Like {
      ...LikePreview
    }
    ... on Follow {
      ...FollowPreview
    }
  }
}
query user($userId: String!) {
    user(userId: $userId) {
        outbox(limit:15) {
            edges {
                user {
                    icon {
                        id
                    }
                    name
                    image {
                        id
                    }
                }
                verb
                context  {
                    ... on Community {
                        ...CommunityPreview
                    }
                    ... on Collection {
                        ...CollectionPreview
                    }
                    ... on Resource {
                        ...ResourcePreview
                    }
                    ... on User {
                        ...UserPreview
                    }
                    ... on Comment {
                        ...CommentPreview
                    }
                    ... on Flag {
                        ...FlagPreview
                    }
                    ... on Like {
                        ...LikePreview
                    }
                    ... on Follow {
                        ...FollowPreview
                    }
                }

            }
            totalCount
            pageInfo {
                hasNextPage
                hasPreviousPage
            }
        }
    }
}
mutation deleteFlagContext($contextId:String!){
  delete(contextId:$contextId){
    ...on Collection { id }
    ...on Comment { id }
    ...on Community { id }
    # ...on Feature { id }
    ...on Flag { id }
    ...on Follow { id }
    ...on Like { id }
    ...on Resource { id }
    # ...on Thread { id }
  }
}
mutation unlike($contextId: String!) {
  delete(contextId: $contextId){
    ... on Like {
      context{
        ...on Collection{
          id
          myLike{ id }
          likerCount
        }
        ...on Comment{
          id
          myLike{ id }
          likerCount
        }
        ...on Community{
          id
          myLike{ id }
          likerCount
        }
        ...on Resource{
          id
          myLike{ id }
          likers{ totalCount }
        }
        ...on User{
          userId: id
          myLike{ id }
          likerCount
        }
      }
    }
  }
}
@VolodymyrPavlichenko
Copy link
Collaborator

user, me, like, Activity, Collection, Community

Like

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

3 participants