{"id":14976211,"url":"https://github.com/kazekyo/nau","last_synced_at":"2025-10-27T18:30:52.784Z","repository":{"id":37077991,"uuid":"337049478","full_name":"kazekyo/nau","owner":"kazekyo","description":"A tool that makes Apollo Client more productive for users using Relay GraphQL Server Specification compliant backends.","archived":false,"fork":false,"pushed_at":"2023-08-11T18:47:58.000Z","size":11657,"stargazers_count":17,"open_issues_count":9,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-21T12:37:23.317Z","etag":null,"topics":["apollo","graphql","graphql-code-generator"],"latest_commit_sha":null,"homepage":"https://www.naugraphql.com/","language":"TypeScript","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/kazekyo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-08T11:12:02.000Z","updated_at":"2023-07-22T08:50:17.000Z","dependencies_parsed_at":"2023-07-17T19:59:42.537Z","dependency_job_id":"ff63d5b4-99f7-4587-8849-2d1285ad936f","html_url":"https://github.com/kazekyo/nau","commit_stats":{"total_commits":802,"total_committers":3,"mean_commits":267.3333333333333,"dds":0.2955112219451371,"last_synced_commit":"544a76a93c4cdefdf7f9b48db9c562194e654f25"},"previous_names":["kazekyo/apollo-relay-style-pagination"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/kazekyo/nau","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kazekyo%2Fnau","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kazekyo%2Fnau/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kazekyo%2Fnau/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kazekyo%2Fnau/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kazekyo","download_url":"https://codeload.github.com/kazekyo/nau/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kazekyo%2Fnau/sbom","scorecard":{"id":552277,"data":{"date":"2025-08-11","repo":{"name":"github.com/kazekyo/nau","commit":"9bf179e12f353e4bcec87c08f2a0e28c654cb763"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.6,"checks":[{"name":"Code-Review","score":-1,"reason":"Found no human activity in the last 16 changesets","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":"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":"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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql-analysis.yml:28","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql-analysis.yml:29","Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Warn: no topLevel permission defined: .github/workflows/codeql-analysis.yml:1","Info: no jobLevel write permissions found"],"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":"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":"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/kazekyo/nau/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/kazekyo/nau/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/kazekyo/nau/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/kazekyo/nau/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:59: update your workflow using https://app.stepsecurity.io/secureworkflow/kazekyo/nau/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:72: update your workflow using https://app.stepsecurity.io/secureworkflow/kazekyo/nau/codeql-analysis.yml/main?enable=pin","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned"],"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: MIT-LICENSE.txt:0","Info: FSF or OSI recognized license: MIT License: MIT-LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"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":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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"}},{"name":"SAST","score":7,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"60 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-wf5p-g6vw-rhxx","Warn: Project is vulnerable to: GHSA-jr5f-v2jv-69x6","Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-mf6x-hrgr-658f","Warn: Project is vulnerable to: GHSA-xrh7-m5pp-39r6","Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc","Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx","Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc","Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp","Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97","Warn: Project is vulnerable to: GHSA-c7qv-q95q-8v27","Warn: Project is vulnerable to: GHSA-4www-5p9h-95mh","Warn: Project is vulnerable to: GHSA-9gqv-wp59-fq42","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-76c9-3jph-rj3q","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j","Warn: Project is vulnerable to: GHSA-x7hr-w5r2-h6wg","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-w5p7-h5w8-2hfq","Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986","Warn: Project is vulnerable to: GHSA-wr3j-pwj9-hqq6","Warn: Project is vulnerable to: GHSA-4v9v-hfq4-rm2v","Warn: Project is vulnerable to: GHSA-9jgg-88mc-972h","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-hpx4-r86g-5jrg","Warn: Project is vulnerable to: GHSA-prr3-c3m5-p7q2","Warn: Project is vulnerable to: GHSA-h5c3-5r3r-rr8q","Warn: Project is vulnerable to: GHSA-rmvr-2pp2-xj38","Warn: Project is vulnerable to: GHSA-xx4v-prfh-6cgc","Warn: Project is vulnerable to: GHSA-j5g3-5c8r-7qfx","Warn: Project is vulnerable to: GHSA-f6v4-cf5j-vf3w","Warn: Project is vulnerable to: GHSA-ghr5-ch3p-vcr6","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-9pv7-vfvm-6vr7","Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22","Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp","Warn: Project is vulnerable to: GHSA-rp65-9cf3-cjxr","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-wqq4-5wpv-mx2g","Warn: Project is vulnerable to: GHSA-3787-6prv-h9w3","Warn: Project is vulnerable to: GHSA-9qxr-qj54-h672","Warn: Project is vulnerable to: GHSA-m4v8-wqvr-p9f7","Warn: Project is vulnerable to: GHSA-c76h-2ccp-4975","Warn: Project is vulnerable to: GHSA-cxrh-j4jr-qwg3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T11:12:42.871Z","repository_id":37077991,"created_at":"2025-08-20T11:12:42.871Z","updated_at":"2025-08-20T11:12:42.871Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281319839,"owners_count":26481071,"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","status":"online","status_checked_at":"2025-10-27T02:00:05.855Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["apollo","graphql","graphql-code-generator"],"created_at":"2024-09-24T13:53:30.930Z","updated_at":"2025-10-27T18:30:52.397Z","avatar_url":"https://github.com/kazekyo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003ch1 align=\"center\"\u003e\nNau\n\u003c/h1\u003e\n\nNau is a tool that makes [Apollo Client](https://github.com/apollographql/apollo-client) more productive for users using [Relay GraphQL Server Specification](https://relay.dev/docs/guides/graphql-server-specification) compliant backends.\n\n- Make cache operations very easy\n- Provide custom directives to write declaratively and improve productivity\n- Support co-location of components and fragments by allowing a query to split into the fragments\n- Support subscriptions\n\nThe tool aims to help frontend developers build frontend applications more quickly, with fewer bugs, and more efficiently.\n\nNau is a perfect fit with React, Apollo Client, GraphQL Code Generator, and TypeScript.\n\n\n## Installation\n```\nyarn add @kazekyo/nau\nyarn add --dev @kazekyo/nau-graphql-codegen-preset\n```\n\n\u003e ⚠️ The packages are currently under development. All version updates may have breaking changes.\n\n## Documentation\nhttps://www.naugraphql.com\n\n\n## Example\n![nau-demo](https://user-images.githubusercontent.com/456381/168417859-df6222b4-ae80-4dd1-a4ef-9117536bef14.gif)\n\nSee the [example code](https://github.com/kazekyo/nau/tree/main/examples/app).\n\n\nYou can write pagination and cache updates more easily using some GraphQL directives. :rocket:\n```src/List.tsx\nimport { gql, useMutation, useSubscription } from '@apollo/client';\nimport { usePagination } from '@kazekyo/nau';\nimport * as React from 'react';\nimport {\n  AddItemMutationDocument,\n  ItemAddedSubscriptionDocument,\n  ItemRemovedSubscriptionDocument,\n  List_PaginationQueryDocument,\n  List_UserFragment\n} from './generated/graphql';\nimport ListItem from './ListItem';\n\ngql`\n  fragment List_user on User\n  @argumentDefinitions(count: { type: \"Int\", defaultValue: 2 }, cursor: { type: \"String\" })\n  @refetchable(queryName: \"List_PaginationQuery\") {\n    items(first: $count, after: $cursor) @pagination {\n      edges {\n        node {\n          ...ListItem_item\n        }\n      }\n    }\n    ...ListItem_user\n  }\n\n  mutation AddItemMutation($input: AddItemInput!, $connections: [String!]!) {\n    addItem(input: $input) {\n      item @prependNode(connections: $connections) {\n        ...ListItem_item\n      }\n    }\n  }\n\n  subscription ItemAddedSubscription($connections: [String!]!) {\n    itemAdded {\n      item @prependNode(connections: $connections) {\n        ...ListItem_item\n      }\n    }\n  }\n\n  subscription ItemRemovedSubscription {\n    itemRemoved {\n      id @deleteRecord(typename: \"Item\")\n    }\n  }\n`;\n\nconst List: React.FC\u003c{ user: List_UserFragment }\u003e = ({ user }) =\u003e {\n  useSubscription(ItemAddedSubscriptionDocument, {\n    variables: {\n      connections: [user.items._connectionId],\n    },\n  });\n  useSubscription(ItemRemovedSubscriptionDocument);\n  const [addItem] = useMutation(AddItemMutationDocument);\n  const { nodes, hasNext, loadNext, isLoading } = usePagination(List_PaginationQueryDocument, {\n    id: user.id,\n    connection: user.items,\n  });\n\n  return (\n    \u003c\u003e\n      \u003cdiv\u003e\n        \u003cbutton\n          onClick={() =\u003e\n            void addItem({\n              variables: {\n                input: { itemName: 'new item', userId: user.id },\n                connections: [user.items._connectionId],\n              },\n            })\n          }\n        \u003e\n          Add Item\n        \u003c/button\u003e\n      \u003c/div\u003e\n      \u003cdiv\u003e\n        {nodes.map((node) =\u003e {\n          return (\n            \u003cdiv key={node.id}\u003e\n              \u003cListItem user={user} item={node} /\u003e\n            \u003c/div\u003e\n          );\n        })}\n      \u003c/div\u003e\n      {hasNext \u0026\u0026 (\n        \u003cbutton onClick={() =\u003e loadNext(2)} disabled={!hasNext}\u003e\n          Load more\n        \u003c/button\u003e\n      )}\n    \u003c/\u003e\n  );\n};\n\nexport default List;\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkazekyo%2Fnau","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkazekyo%2Fnau","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkazekyo%2Fnau/lists"}