MCPcopy Index your code
hub / github.com/github/github-mcp-server / ToGraphQLParams

Method ToGraphQLParams

pkg/github/params.go:483–490  ·  view source on GitHub ↗

ToGraphQLParams converts REST API pagination parameters to GraphQL-specific parameters. This converts page/perPage to first parameter for GraphQL queries. If After is provided, it takes precedence over page-based pagination.

()

Source from the content-addressed store, hash-verified

481// This converts page/perPage to first parameter for GraphQL queries.
482// If After is provided, it takes precedence over page-based pagination.
483func (p PaginationParams) ToGraphQLParams() (*GraphQLPaginationParams, error) {
484 // Convert to CursorPaginationParams and delegate to avoid duplication
485 cursor := CursorPaginationParams{
486 PerPage: p.PerPage,
487 After: p.After,
488 }
489 return cursor.ToGraphQLParams()
490}

Callers 5

ListIssuesFunction · 0.45
ListDiscussionsFunction · 0.45
GetDiscussionCommentsFunction · 0.45
IssueDependencyReadFunction · 0.45

Calls 1

ToGraphQLParamsMethod · 0.95

Tested by

no test coverage detected