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

feat: add pagination support to user media query #322

Merged
merged 5 commits into from
Jul 2, 2023
Merged

Conversation

vnugent
Copy link
Contributor

@vnugent vnugent commented Jun 20, 2023

Issue #320
Needed by frontend PR: OpenBeta/open-tacos#869

I followed GQL recommended approach for implementing a cursor-based pagination.

# Sample query
query GetNextPage {
  getUserMediaPagination(
    input: {userUuid: "b9f8ab3b-e6e5-4467-9adb-65d91c7ebe7c", first: 3, after: "1675245914389_645aa64261c73112fc19b505"}
  ) {
    userUuid
    mediaConnection {
      edges {
        cursor
        node {
          username
          mediaUrl
          entityTags {
            climbName
            id
          }
          id
        }
      }
    }
  }
}

@vnugent vnugent changed the title wip feat: add pagination support to user media query Jun 20, 2023
@vnugent vnugent marked this pull request as ready for review June 29, 2023 06:36
Copy link
Contributor

@musoke musoke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left one comment on something I may have misunderstood - other than that it looks good to me as a non-expert.

src/model/MediaDataSource.ts Show resolved Hide resolved
@musoke
Copy link
Contributor

musoke commented Jul 2, 2023 via email

@vnugent vnugent merged commit 2c5c483 into develop Jul 2, 2023
@vnugent vnugent deleted the feat-320 branch July 2, 2023 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants