{"id":15486502,"url":"https://github.com/dyedgreen/juniper-relay","last_synced_at":"2025-04-22T17:40:39.975Z","repository":{"id":61484066,"uuid":"551919044","full_name":"dyedgreen/juniper-relay","owner":"dyedgreen","description":"Relay style pagination for Juniper","archived":false,"fork":false,"pushed_at":"2022-10-15T11:55:59.000Z","size":7,"stargazers_count":5,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-19T07:15:24.427Z","etag":null,"topics":["graphql","juniper","relay","rust-lang"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/juniper_relay_connection","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dyedgreen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-10-15T11:47:41.000Z","updated_at":"2023-06-03T04:06:20.000Z","dependencies_parsed_at":"2022-10-20T10:45:40.765Z","dependency_job_id":null,"html_url":"https://github.com/dyedgreen/juniper-relay","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyedgreen%2Fjuniper-relay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyedgreen%2Fjuniper-relay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyedgreen%2Fjuniper-relay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyedgreen%2Fjuniper-relay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dyedgreen","download_url":"https://codeload.github.com/dyedgreen/juniper-relay/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250288885,"owners_count":21405873,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["graphql","juniper","relay","rust-lang"],"created_at":"2024-10-02T06:08:40.948Z","updated_at":"2025-04-22T17:40:39.902Z","avatar_url":"https://github.com/dyedgreen.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Juniper Relay Connections\n\n[![crates.io](https://img.shields.io/crates/v/juniper_relay_connection.svg)](https://crates.io/crates/juniper_relay_connection)\n[![Released API docs](https://docs.rs/juniper_relay_connection/badge.svg)](https://docs.rs/juniper_relay_connection)\n[![CI](https://github.com/dyedgreen/juniper-relay/actions/workflows/ci.yml/badge.svg)](https://github.com/dyedgreen/juniper-relay/actions/workflows/ci.yml)\n[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)\n\nRelay style pagination for Juniper.\n\nThis library provides the a `RelayConnection` struct, which can be returned in a Juniper GraphQL\nschema and implements the [relay connection interface][spec].\n\n## Example\n\n```rust\n#[derive(GraphQLObject)]\nstruct Foo {\n  id: i32,\n}\n\nimpl RelayConnectionNode for Foo {\n    type Cursor = i32;\n    fn cursor(\u0026self) -\u003e Self::Cursor {\n        self.id\n    }\n    fn connection_type_name() -\u003e \u0026'static str {\n        \"FooConnection\"\n    }\n    fn edge_type_name() -\u003e \u0026'static str {\n        \"FooConnectionEdge\"\n    }\n}\n\nRelayConnection::new(first, after, last, before, |after, before, limit| {\n    let sql = format!(\"SELECT (id) FROM foo WHERE id \u003e {after} AND id \u003c {before} LIMIT {limit}\");\n    let edges: Vec\u003cFoo\u003e = run_query(sql);\n    Ok(edges)\n})\n```\n\n[spec]: https://relay.dev/graphql/connections.htm\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdyedgreen%2Fjuniper-relay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdyedgreen%2Fjuniper-relay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdyedgreen%2Fjuniper-relay/lists"}