{"id":13499659,"url":"https://github.com/RishikeshDarandale/serverless-graphql-boilerplate","last_synced_at":"2025-03-29T05:32:01.886Z","repository":{"id":37549499,"uuid":"175357822","full_name":"RishikeshDarandale/serverless-graphql-boilerplate","owner":"RishikeshDarandale","description":"A boilerplate template for serverless graphql (apollo) project","archived":false,"fork":false,"pushed_at":"2024-06-18T05:01:15.000Z","size":4092,"stargazers_count":12,"open_issues_count":40,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-01T22:51:35.684Z","etag":null,"topics":["apollo","apollo-server","boilerplate","graphql","graphql-server","serverless","serverless-framework"],"latest_commit_sha":null,"homepage":"https://rishikeshdarandale.github.io/serverless-graphql-boilerplate/","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/RishikeshDarandale.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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":"2019-03-13T06:12:43.000Z","updated_at":"2021-01-19T03:07:36.000Z","dependencies_parsed_at":"2023-12-20T10:23:41.703Z","dependency_job_id":"8ebcca14-28d2-4b38-8ad5-877fab635cba","html_url":"https://github.com/RishikeshDarandale/serverless-graphql-boilerplate","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RishikeshDarandale%2Fserverless-graphql-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RishikeshDarandale%2Fserverless-graphql-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RishikeshDarandale%2Fserverless-graphql-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RishikeshDarandale%2Fserverless-graphql-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RishikeshDarandale","download_url":"https://codeload.github.com/RishikeshDarandale/serverless-graphql-boilerplate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222465549,"owners_count":16989038,"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":["apollo","apollo-server","boilerplate","graphql","graphql-server","serverless","serverless-framework"],"created_at":"2024-07-31T22:00:37.716Z","updated_at":"2024-10-31T18:30:58.789Z","avatar_url":"https://github.com/RishikeshDarandale.png","language":"JavaScript","funding_links":[],"categories":["Examples","Uncategorized"],"sub_categories":["JavaScript Examples","Uncategorized"],"readme":"# Serverless graphql boilerplate\n\n:wrench: with :heart:\n\nThis is project template for [apollo graphql server 2.0][1] with [AWS lambda][2] and [AWS API Gateway][3] with [serverless][4] framework. This template gives a quick way to start with your apollo graphql server with AWS services using serverless framework.\n\n## Quick Usage\n\nPlease make sure you have following:\n- node 8+\n- java 8 (if you want to use dynamodb local)\n- serverless (if you want to use `sls install`)\n\n\u003e If you do not prefer to install serverless globally, then just use `git clone`\n\n```console\n\u003e sls install -u https://github.com/RishikeshDarandale/serverless-graphql-boilerplate -n myservice\nOR\n\u003e git clone https://github.com/RishikeshDarandale/serverless-graphql-boilerplate myservice\n\u003e cd myservice\n\u003e npm install\n\u003e npx sls offline start --stage local\n```\n\n\u003e Note: please update your service name in `serverless.yml`\n\n## Apollo graphql server\n\nThis project template uses [apollo-server-lambda][5] to expose the graphql server as AWS lambda function. The graphql schema and resolvers are aranged in such fashion that each type and it's resolvers will be in the same file. This will allow better management of your schema and maintenability of it. Just add a new `[type].js` and `typeDef` and `resolvers` as in the sample file, they will automatically sticted in main schema.\n\n## serverless configurations\n\nYes, this is needed in every project. This template maintains the configuration under `./config` directory. Configuration is kept for per `region` per `environment`.\n\n## Serveless plugins\n\n- serverless-offline\n\nTo emulate your lambda with API gateway, this template uses [serverless-offline][6] plugin.\n\n- webpack\n\nTo optimize and bundle all dependencies for lambda deployment, this template uses [serverless-webpack][7] plugin.\n\n- serverless-dynanodb-local\n\nTo emulate dynamodb service, this template uses [serverless-dynamodb-local][8] plugin\n\n## Project Layout\n\n```console\nserverless-graphql-boilerplate\n|-- CONTRIBUTING.md\n|-- README.md\n|-- config    // configuration related to project\n|   `-- us-east-1\n|       |-- development.yml\n|       |-- local.yml\n|       `-- production.yml\n|-- functions // graphql function which will have apollo graphql server 2.0 entrypoint\n|   `-- graphql.js\n|-- package-lock.json\n|-- package.json\n|-- seed      // dynamodb table seed data\n|   `-- example.json\n|-- serverless.yml\n|-- src\n|   |-- aws-resources // other aws resources for this stack\n|   |   |-- dynamodb-table.yml\n|   |   `-- lambda-role.yml\n|   |-- graphql      // graphql schema and resolvers\n|   |   |-- schema.js\n|   |   `-- type.js\n|   |-- libs         // source code\n|   |   `-- utils\n|   |       `-- LogUtils.js\n|   `-- tests        // unit / integration tests\n`-- webpack.config.js\n```\n\n# Going forward\n\nserverless world is unlimited, please feel free to update your project with other [plugins][10] as per your need.\n\nI am still tempting to add [linting][13], [prettier][14], [commitlint][15] and [husky][16] to this project, but holding back as other project may have different needs. Please feel free to refer my other([website-deploy][11] or [apollo-dataSource-soap][12]) project for these configurations.\n\n# Contributing\n\n:star: Star me on GitHub — it helps!\n\n:heart: contribution: Here is [contributing guide][9] in deatil.\n\nFor impatient here are quick steps:\n\n- **Fork** the repository\n- Create **Branch** in you local repository\n- while(youFinish) { **Commit** }\n- **Squash** related commits.\n- **Write** unit test cases for your work.\n- Check the **Build** on your local.\n- Raise a **Pull Request** (aka PR)\n\n\n[1]: https://www.apollographql.com/docs/apollo-server/\n[2]: https://aws.amazon.com/lambda/\n[3]: https://aws.amazon.com/api-gateway/\n[4]: https://serverless.com/\n[5]: https://www.apollographql.com/docs/apollo-server/servers/lambda.html\n[6]: https://github.com/dherault/serverless-offline\n[7]: https://github.com/serverless-heaven/serverless-webpack\n[8]: https://www.npmjs.com/package/serverless-dynamodb-local\n[9]: ./CONTRIBUTING.md\n[10]: https://github.com/serverless/plugins\n[11]: https://github.com/RishikeshDarandale/website-deploy\n[12]: https://github.com/RishikeshDarandale/apollo-datasource-soap\n[13]: https://github.com/google/eslint-config-google\n[14]: https://github.com/prettier/prettier\n[15]: https://github.com/conventional-changelog/commitlint\n[16]: https://github.com/typicode/husky\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRishikeshDarandale%2Fserverless-graphql-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FRishikeshDarandale%2Fserverless-graphql-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRishikeshDarandale%2Fserverless-graphql-boilerplate/lists"}