{"id":19702883,"url":"https://github.com/artemkloko/amplify-graphql-apollo-hooks-generator","last_synced_at":"2025-09-13T08:13:52.794Z","repository":{"id":57177462,"uuid":"314521653","full_name":"artemkloko/amplify-graphql-apollo-hooks-generator","owner":"artemkloko","description":"Generate boilerplate React Apollo hooks for queries, mutations and subscriptions for the provided introspection schema","archived":false,"fork":false,"pushed_at":"2020-11-20T13:36:14.000Z","size":139,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-03T11:56:05.854Z","etag":null,"topics":["apollo","appsync","aws","graphql","hooks","react"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/amplify-graphql-apollo-hooks-generator","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/artemkloko.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":"2020-11-20T10:33:11.000Z","updated_at":"2023-07-26T17:59:19.000Z","dependencies_parsed_at":"2022-09-14T02:30:24.973Z","dependency_job_id":null,"html_url":"https://github.com/artemkloko/amplify-graphql-apollo-hooks-generator","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/artemkloko/amplify-graphql-apollo-hooks-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artemkloko%2Famplify-graphql-apollo-hooks-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artemkloko%2Famplify-graphql-apollo-hooks-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artemkloko%2Famplify-graphql-apollo-hooks-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artemkloko%2Famplify-graphql-apollo-hooks-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/artemkloko","download_url":"https://codeload.github.com/artemkloko/amplify-graphql-apollo-hooks-generator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artemkloko%2Famplify-graphql-apollo-hooks-generator/sbom","scorecard":{"id":209068,"data":{"date":"2025-08-11","repo":{"name":"github.com/artemkloko/amplify-graphql-apollo-hooks-generator","commit":"1cf2f2aa42391509c57aedb718217107f443907b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.2,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/11 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":"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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/npm-publish.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":"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":"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/npm-publish.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/artemkloko/amplify-graphql-apollo-hooks-generator/npm-publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npm-publish.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/artemkloko/amplify-graphql-apollo-hooks-generator/npm-publish.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/npm-publish.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/artemkloko/amplify-graphql-apollo-hooks-generator/npm-publish.yml/master?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party 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":"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":"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":"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"}},{"name":"Vulnerabilities","score":0,"reason":"66 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-846g-p7hm-f54r","Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25","Warn: Project is vulnerable to: GHSA-rrc9-gqf8-8rwg","Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-cwfw-4gq5-mrqx","Warn: Project is vulnerable to: GHSA-g95f-p29q-9xw4","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-7gc6-qh9x-w6h8","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-9j49-mfvp-vmhm","Warn: Project is vulnerable to: GHSA-phwq-j96m-2c2q","Warn: Project is vulnerable to: GHSA-ghr5-ch3p-vcr6","Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc","Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97","Warn: Project is vulnerable to: GHSA-765h-qjxv-5f44","Warn: Project is vulnerable to: GHSA-f2jv-r9rf-7988","Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22","Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-8hfj-j24r-96c4","Warn: Project is vulnerable to: GHSA-wc69-rhjr-hc9g","Warn: Project is vulnerable to: GHSA-56x4-j7p9-fcf9","Warn: Project is vulnerable to: GHSA-v78c-4p63-2j6c","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-4c7m-wxvm-r7gc","Warn: Project is vulnerable to: GHSA-pch5-whg9-qr2r","Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g","Warn: Project is vulnerable to: GHSA-w7rc-rwvf-8q5r","Warn: Project is vulnerable to: GHSA-px4h-xg32-q955","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-394c-5j6w-4xmx","Warn: Project is vulnerable to: GHSA-78cj-fxph-m83p","Warn: Project is vulnerable to: GHSA-fhg7-m89q-25r3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-776f-qx25-q3cc","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh"],"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-17T00:23:35.188Z","repository_id":57177462,"created_at":"2025-08-17T00:23:35.188Z","updated_at":"2025-08-17T00:23:35.188Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274935979,"owners_count":25376836,"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-09-13T02:00:10.085Z","response_time":70,"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","appsync","aws","graphql","hooks","react"],"created_at":"2024-11-11T21:16:22.806Z","updated_at":"2025-09-13T08:13:52.772Z","avatar_url":"https://github.com/artemkloko.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# amplify-graphql-apollo-hooks-generator\n\nGenerate boilerplate React Apollo hooks for queries, mutations and subscriptions for the provided introspection schema.\n\n---\n\nThe generated hooks are just basic wrappers for Apollo hooks provided by `@apollo/client` and they do not offer any extra capabilities from what the Apollo hooks offer.\n\nThe only gain of using this plugin is to not waste time on creating and updating those hooks manually after schema changes. And it's especially usefull while bootstraping a new project.\n\n---\n\nSome examples of generated hooks\n\n```typescript\nexport const useGetUserQuery = (\n  options?: QueryHookOptions\u003cGetUserQuery, GetUserQueryVariables\u003e\n) =\u003e useQuery\u003cGetUserQuery, GetUserQueryVariables\u003e(gql(getUser), options);\n\nexport const useGetUserLazyQuery = (\n  options?: LazyQueryHookOptions\u003cGetUserQuery, GetUserQueryVariables\u003e\n) =\u003e useLazyQuery\u003cGetUserQuery, GetUserQueryVariables\u003e(gql(getUser), options);\n```\n\n```typescript\nexport const useCreateUserMutation = (\n  options?: MutationHookOptions\u003cCreateUserMutation, CreateUserMutationVariables\u003e\n) =\u003e useMutation\u003cCreateUserMutation, CreateUserMutationVariables\u003e(gql(createUser), options);\n```\n\n```typescript\nexport const useOnCreateUserSubscription = (\n  options?: SubscriptionHookOptions\u003cOnCreateUserSubscription\u003e\n) =\u003e useSubscription\u003cOnCreateUserSubscription\u003e(gql(onCreateUser), options);\n```\n\nThe generated hooks are utilizing the following Apollo hooks\n\n```\nqueries: { useQuery, useLazyQuery} from \"@apollo/client\"\nmutations: { useMutation } from \"@apollo/client\"\nsubscriptions: { useSubscription } from \"@apollo/client\"\n```\n\n## Setup\n\nInstall the plugin globally and add it to Amplify cli\n\n```sh\nyarn global add amplify-graphql-apollo-hooks-generator\namplify plugin add amplify-graphql-apollo-hooks-generator\n```\n\nAdd `apolloHooksPath` to `.graphqlconfig.yml` of your Amplify project\n\n```yml\nprojects:\n  chat:\n    schemaPath: amplify/backend/api/chat/build/schema.graphql\n    includes:\n      - src/graphql/statements/*.ts\n    excludes:\n      - amplify/**\n    extensions:\n      amplify:\n        maxDepth: 2\n        codeGenTarget: typescript\n        generatedFileName: src/@types/graphql.ts\n        docsFilePath: src/graphql/statements\n        apolloHooksPath: src/graphql/hooks\nextensions:\n  amplify:\n    version: 3\n```\n\nAdd `@apollo/client` and `graphql-tag` as dependencies in your project, as the generated hooks utilize those\n\n```sh\nyarn add @apollo/client graphql-tag\n```\n\n## Usage\n\nAfter pushing the API and generating the GraphQL statements and types - run `amplify apollo-hooks generate` to generate the React Apollo hooks\n\n```sh\namplify push api\namplify codegen\namplify apollo-hooks generate\n```\n\nCheck out your `apolloHooksPath` for the results\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartemkloko%2Famplify-graphql-apollo-hooks-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fartemkloko%2Famplify-graphql-apollo-hooks-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartemkloko%2Famplify-graphql-apollo-hooks-generator/lists"}