{"id":27471787,"url":"https://github.com/justinjmoses/graph-results-pager","last_synced_at":"2025-04-16T02:01:55.094Z","repository":{"id":40729039,"uuid":"237140493","full_name":"jjgonecrypto/graph-results-pager","owner":"jjgonecrypto","description":"Utility to get paged results from The Graph endpoints","archived":false,"fork":false,"pushed_at":"2024-08-28T10:09:10.000Z","size":381,"stargazers_count":13,"open_issues_count":3,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-09T19:05:12.196Z","etag":null,"topics":["dapps","ethereum","thegraphprotocol"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/jjgonecrypto.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":"2020-01-30T04:44:14.000Z","updated_at":"2024-11-11T14:00:43.000Z","dependencies_parsed_at":"2022-08-19T08:32:54.686Z","dependency_job_id":null,"html_url":"https://github.com/jjgonecrypto/graph-results-pager","commit_stats":null,"previous_names":["justinjmoses/graph-results-pager"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjgonecrypto%2Fgraph-results-pager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjgonecrypto%2Fgraph-results-pager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjgonecrypto%2Fgraph-results-pager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjgonecrypto%2Fgraph-results-pager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jjgonecrypto","download_url":"https://codeload.github.com/jjgonecrypto/graph-results-pager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249183098,"owners_count":21226140,"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":["dapps","ethereum","thegraphprotocol"],"created_at":"2025-04-16T02:01:26.059Z","updated_at":"2025-04-16T02:01:55.082Z","avatar_url":"https://github.com/jjgonecrypto.png","language":"JavaScript","funding_links":[],"categories":["SubGraph"],"sub_categories":["Tools"],"readme":"# graph-results-pager\n\n[![npm version](https://badge.fury.io/js/graph-results-pager.svg)](https://badge.fury.io/js/graph-results-pager)\n\nUtility to get paged results from The Graph endpoints\n\n## Node \u0026 Webpack Usage\n\n```javascript\nconst graphResultsPager = require('graph-results-pager'); // common js\n// or\nimport graphResultsPager from 'graph-results-pager';\n\ngraphResultsPager({\n\tapi: 'https://api.thegraph.com/subgraphs/name/...',\n\t// Note: a single subgraph fetch can return 1000 results, any larger numbers will trigger multiple fetches\n\tmax: 12, // leave empty for all results\n\ttimeout: 5e3, // 5s timeout for an individual page request\n\tquery: {\n\t\tentity: '...',\n\t\tselection: {\n\t\t\torderBy: '...',\n\t\t\torderDirection: 'desc',\n\t\t\twhere: {\n\t\t\t\t// Note: the below filters are combined - like the AND operater in an SQL WHERE clause\n\t\t\t\tsomeStringField: `\\\\\"${someValue}\\\\\"`, // use double quotes for strings / bytes / addresses\n\t\t\t\tsomeNumber: 321, // numbers don't require escaping\n\t\t\t\t// ...\n\t\t\t\twillBeIgnored: undefined, // useful if you want to use the ternary operator for inline checks\n\t\t\t},\n\t\t},\n\t\tproperties: [\n\t\t\t'id',\n\t\t\t...ss, // the list of the entity's fields you want returned\n\t\t],\n\t},\n});\n```\n\nFor an example in node, try running `node example.js` ([see source](./example.js))\n\n## Direct browser usage\n\n```html\n\u003cscript src=\"//cdn.jsdelivr.net/npm/graph-results-pager/browser.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n\twindow.graphResultsPager({...}).then(console.log).catch(console.error)\n\u003c/script\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustinjmoses%2Fgraph-results-pager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustinjmoses%2Fgraph-results-pager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustinjmoses%2Fgraph-results-pager/lists"}