{"id":31642598,"url":"https://github.com/codejie/fastify-apollo-step","last_synced_at":"2025-10-07T04:02:15.198Z","repository":{"id":57233256,"uuid":"116142261","full_name":"codejie/fastify-apollo-step","owner":"codejie","description":"Set up Apollo Server with Fastify.","archived":false,"fork":false,"pushed_at":"2020-11-19T02:32:10.000Z","size":108,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-18T21:58:27.690Z","etag":null,"topics":["apollo-server","fastify","graphql"],"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/codejie.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":"2018-01-03T13:51:57.000Z","updated_at":"2021-07-21T08:38:26.000Z","dependencies_parsed_at":"2022-08-31T14:11:14.200Z","dependency_job_id":null,"html_url":"https://github.com/codejie/fastify-apollo-step","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codejie/fastify-apollo-step","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codejie%2Ffastify-apollo-step","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codejie%2Ffastify-apollo-step/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codejie%2Ffastify-apollo-step/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codejie%2Ffastify-apollo-step/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codejie","download_url":"https://codeload.github.com/codejie/fastify-apollo-step/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codejie%2Ffastify-apollo-step/sbom","scorecard":{"id":296545,"data":{"date":"2025-08-11","repo":{"name":"github.com/codejie/fastify-apollo-step","commit":"1d3d66d5eadc42d0d7c53bfc573cec21f84a2c61"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"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/21 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":"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":"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":"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":"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":"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":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"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-17T19:40:48.338Z","repository_id":57233256,"created_at":"2025-08-17T19:40:48.338Z","updated_at":"2025-08-17T19:40:48.338Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278717433,"owners_count":26033542,"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-07T02:00:06.786Z","response_time":59,"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-server","fastify","graphql"],"created_at":"2025-10-07T04:00:36.193Z","updated_at":"2025-10-07T04:02:15.191Z","avatar_url":"https://github.com/codejie.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fastify-apollo-step\nSet up Apollo Server with Fastify.\n\n`update dependencies to the latest version.`\n\n```\n  \"dependencies\": {\n    \"@types/node\": \"^14.14.8\",\n    \"apollo-server-core\": \"^2.19.0\",\n    \"fastify\": \"^3.8.0\",\n    \"graphql\": \"^15.4.0\",\n    \"graphql-playground-html\": \"^1.6.29\",\n    \"graphql-subscriptions\": \"^1.1.0\",\n    \"graphql-tools\": \"^7.0.1\"\n  }\n```\n\n# [fastify](https://github.com/fastify) \nFast and low overhead web framework, for Node.js\n\n# [apollo](https://github.com/apollographql)\nA community building flexible open source tools for GraphQL.\n\n# fastify-apollo-step\nAs Apollo offical page said that Apollo Server can work with many Node.js HTTP frameworks, but no fastify in that list. So let's make one.\n\nfastify-apollo-step is designed as a plugin of fastify, just call `register` to use it.\n\nfastify-apollo-step also supports graphiql/playground module of Apollo Server.\n\n\n# Usage\n```\nnpm install --save fastify-apollo-step apollo-server-core graphql fastify graphql-playground-html graphql-tools graphql-subscriptions\n\n```\n* by fastify, just need apollo-server-core, not apollo-server\n\n\n# Options\nfastify-apollo-step can be configurated with the follow option object, inclues itself configurations and Apollo Server configurations.\n\n```js\nconst options = {\n    path: '/ql',\n    context: undefined,\n    gqlSchema: undefined,\n    typeDefs: typeDefs,\n    resolvers: resolvers,\n    subscriptions: {\n      enabled: true,\n      path: '/subscriptions',\n      onConnect: (connectionParams, webSocket) =\u003e {\n      },\n      onDisconnect: (webSocket, connectionContext) =\u003e {\n      }\n    },\n    graphiql: {\n      enabled: true,\n      path: '/iql'\n    },\n    routeBeforeHandler: function (request, reply, done) {\n      done();\n    }\n};\n```\n\n* **`path`**: GraphQL module endpoint;\n* **`gqlSchema`**: GraphQL schema, optional if `typeDefs` and `resolvers` exist;\n* **`typeDefs`**: GraphQL type definitions, optional if `schema` exists;\n* **`resolvers`**: GraphQL resolver definitions, optional if `schema` exists;\n* **`subscriptions`**: Options of subscription;\n* **`graphiql`**: Options of GraphiQL of Playground;\n* **`routeBeforeHandler`**: beforeHandler function of Fastify while calls QL or iQL;\n\n# Example\n```js\nconst options = {\n  path: '/ql',\n  typeDefs: typeDefs,\n  resolvers: resolvers,\n  ...\n};\n\nfastify.register(ApolloFastify, options);\n\nfastify.listen(3000, (err) =\u003e {\n  if (err) {\n      console.error('server starts failed - ', err);\n      return;\n  }    \n  console.log('🚀 Server ready at http://localhost:3000');\n});\n\n```\n\n# TypeScript\n\n  Do NOT support TypeScript because NOT compatible with latest Fastify.\n\n~~Ready. But I am not good at TypeScript yet.~~\n\n  ~~To conflict with Fastify Plugin Option, I have to change 'schema' and 'beforeHandler' of FastifyApollo's, Please refer to ./test/ts/subscription.ts.~~\n\n# Test\n\n```\n    npm run query\n    npm run mutation\n    npm run subscription\n```\n\n`Notes: Graphsql query must be with 'operationName' now.`\n```\nquery [querybook] {\n  books {\n    author\n    title\n  }\n}\n```\n\n\n# ScreenShots\n* Query\n\n![Query](https://raw.githubusercontent.com/codejie/fastify-apollo-step/master/screenshots/query.jpg)\n\n* Mutaton\n\n![Mutation](https://raw.githubusercontent.com/codejie/fastify-apollo-step/master/screenshots/mutation.jpg)\n\n* Subscription\n\n![Subscription](https://raw.githubusercontent.com/codejie/fastify-apollo-step/master/screenshots/subscription.jpg)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodejie%2Ffastify-apollo-step","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodejie%2Ffastify-apollo-step","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodejie%2Ffastify-apollo-step/lists"}