{"id":16371280,"url":"https://github.com/deptno/react-apollo-query-until","last_synced_at":"2026-04-25T21:31:54.850Z","repository":{"id":57253576,"uuid":"139801488","full_name":"deptno/react-apollo-query-until","owner":"deptno","description":":peach: GraphQL fetch with end of cursor. It is useful when you require SSR. It's universal lib. Built on top of apollo-graphql.","archived":false,"fork":false,"pushed_at":"2018-07-05T08:05:39.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-12T04:58:23.055Z","etag":null,"topics":["getdatafromtree","graphql","graphql-ssr","query","react-apollo","ssr","universal","until"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deptno.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-05T05:59:40.000Z","updated_at":"2018-07-05T22:49:09.000Z","dependencies_parsed_at":"2022-08-31T22:20:42.122Z","dependency_job_id":null,"html_url":"https://github.com/deptno/react-apollo-query-until","commit_stats":null,"previous_names":["deptno/graphql-query-until"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/deptno/react-apollo-query-until","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deptno%2Freact-apollo-query-until","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deptno%2Freact-apollo-query-until/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deptno%2Freact-apollo-query-until/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deptno%2Freact-apollo-query-until/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deptno","download_url":"https://codeload.github.com/deptno/react-apollo-query-until/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deptno%2Freact-apollo-query-until/sbom","scorecard":{"id":335021,"data":{"date":"2025-08-11","repo":{"name":"github.com/deptno/react-apollo-query-until","commit":"c08fec743c190a957315bcf45d55fa1c6549b449"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/5 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-18T04:31:06.924Z","repository_id":57253576,"created_at":"2025-08-18T04:31:06.925Z","updated_at":"2025-08-18T04:31:06.925Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32278249,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T18:29:39.964Z","status":"ssl_error","status_checked_at":"2026-04-25T18:29:32.149Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["getdatafromtree","graphql","graphql-ssr","query","react-apollo","ssr","universal","until"],"created_at":"2024-10-11T03:07:31.986Z","updated_at":"2026-04-25T21:31:54.816Z","avatar_url":"https://github.com/deptno.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Apollo Query Until\n\n`react-apollo-query-until` is designed for special case of SSR.\n\nIf you need to fetch data until last(or specific) **cursor(offset)**, but `apollo-client` `\u003cQuery\u003e`'s fetchMore doesn't seem to work in SSR(by `getDataFromTree` function).  \nSo I tried to handle `\u003cQuery\u003e` recursive way, and it works.\n\n`react-apollo-query-until` is helper to handle this case. works {server, client} side both.\n\n## Installation\n\n`npm install react-apollo-query-until`\n\n## Usage\n\n### Interface \n```typescript\ninterface Props\u003cProps = any, Data = any, Variables = any\u003e {\n  query: DocumentNode\n  getNextCursor: (data: Data) =\u003e string|undefined\n  merge: (prev: Partial\u003cData\u003e, next: Data) =\u003e Partial\u003cData\u003e\n  cursorProp?: string\n  variables?: Variables\n  data?: Data\n}\n```\n\n\u003e M: Mandatory, O: Optional\n\n- [M] query - GraphQL query to fetch after next cursor, created via `graphql-tag`.\n- [M] variables - GraphQL query variables. It will be use it recursively\n- [M] data - If you start from legacy data(from other query), use as initial data.\n- [O] cursorProp - Merge next cursor property name with `variables`, fallthrough recursively, if next fetch is required. (default: 'cursor').\n- [O] getNextCursor - If you need more fetching data, return next cursor. It will be called every time data is fetched.\n- [O] merge - Data accumulator.\n\n```typescript\nQueryUntil.defaultProps = {\n  cursorProp: 'cursor',\n  variables: {\n    [this.cursorProp]: null,\n  }\n}\n````\n\n\u003e If you specified `cursorProp`, you MUST set `variables` to include cursor property you specified, eg, `{[cursorProps]: null}`\n\n### example\n\n\u003e Use github GraphQL API\n\n```typescript jsx\nimport * as React from 'react'\nimport {QueryUntil} from 'react-apollo-query-until'\n\nconst User: React.SFC\u003c{user: any}\u003e = /* implement some component */\n\nexport const QLGithubUser: React.SFC = () =\u003e\n  \u003cQueryUntil\n    query={query}\n    getNextCursor={data =\u003e {\n      const {hasNextPage, endCursor} = data.user.repositories.pageInfo\n      \n      if (hasNextPage) {\n        return endCursor\n      }\n    }}\n    merge={(prev, data) =\u003e !prev\n      ? data\n      : {\n      ...prev,\n      user: {\n        ...prev.user,\n        repositories: {\n          ...prev.user.repositories,\n          nodes   : prev.user.repositories.nodes.concat(data.user.repositories.nodes),\n          pageInfo: data.user.repositories.pageInfo\n        }\n    }}}\n  \u003e\n    {({data, loading, fetchMore}) =\u003e (loading || !data) ? 'Loading...' : \u003cUser {...data}/\u003e }\n  \u003c/QueryUntil\u003e\n```\n\n## LICENSE\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeptno%2Freact-apollo-query-until","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeptno%2Freact-apollo-query-until","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeptno%2Freact-apollo-query-until/lists"}