{"id":13515962,"url":"https://github.com/simplify-framework/graphql","last_synced_at":"2025-08-22T20:11:45.043Z","repository":{"id":52376904,"uuid":"266784172","full_name":"simplify-framework/graphql","owner":"simplify-framework","description":"A GraphQL Serverless Architecture Model (GSAM) - We help you generating a boilerplate GraphQL based project that immediately can deploy on AWS Lambda function behind an API Gateway as a serverless architecture model.","archived":false,"fork":false,"pushed_at":"2021-05-03T14:28:30.000Z","size":1163,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T22:05:36.848Z","etag":null,"topics":["api-gateway","aws-lambda","boilerplate-graphql","docker","docker-compose","graphql","nodejs","serverless","simplify-framework"],"latest_commit_sha":null,"homepage":"","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/simplify-framework.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-05-25T13:18:34.000Z","updated_at":"2022-01-28T14:11:15.000Z","dependencies_parsed_at":"2022-08-21T07:10:33.315Z","dependency_job_id":null,"html_url":"https://github.com/simplify-framework/graphql","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplify-framework%2Fgraphql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplify-framework%2Fgraphql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplify-framework%2Fgraphql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplify-framework%2Fgraphql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simplify-framework","download_url":"https://codeload.github.com/simplify-framework/graphql/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248119296,"owners_count":21050755,"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":["api-gateway","aws-lambda","boilerplate-graphql","docker","docker-compose","graphql","nodejs","serverless","simplify-framework"],"created_at":"2024-08-01T05:01:17.895Z","updated_at":"2025-04-09T22:05:55.054Z","avatar_url":"https://github.com/simplify-framework.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Simplify Framework - GraphQL \n\nA GraphQL Serverless Architecture Model (GSAM) - Base on amazing [Apollo GraphQL](https://www.apollographql.com/) server project. We help you generating a boilerplate GraphQL based project that immediately can deploy on AWS Lambda function behind an API Gateway as a serverless model. What do you think? You can design GraphQL resolvers as a State Machine (aka AWS Step Functions) inside your project.\n\n![DevOps CI/CD](https://github.com/simplify-framework/graphql/workflows/DevOps%20CI/CD/badge.svg)\n![NPM Downloads](https://img.shields.io/npm/dw/simplify-graphql)\n![Package Version](https://img.shields.io/github/package-json/v/simplify-framework/graphql?color=green)\n\n\t\t\n## HOW TO: Build a GraphQL project:\n- Install this GraphQL CLI: `npm install -g simplify-graphql`\n- Generate a sample schema: `simplify-graphql template -i schema`\n- Generate GraphQL project: `simplify-graphql -i schema.graphql --mode micro`\n\n\u003e It will help you to create your project step by step...\n\n    ╓───────────────────────────────────────────────────────────────╖\n    ║               Simplify Framework  - GraphQL                   ║\n    ╙───────────────────────────────────────────────────────────────╜\n    - Automatic code merge is off (use option --merge to turn on)\n    - Diff file generation is off (use option --diff to turn on)\n\n    - What is your Project name? starwars\n    - What is your Project description? This is a new starwars III\n    - What is your Project Id? (aa405d57a6f189b2): [Enter]\n    - Choose your Deployment Bucket? (starwars-deployment-eu-west-1): \n    - Choose your Deployment Region? (eu-west-1): [Enter]\n    - Create new Deployment Profile? (simplify-eu): [Enter]\n    - What is your AWS Account Id? **your_aws_account_id**\n    - Do you want to use Secret Manager as KeyVault? [y/n]: n\n    - What is your Endpoint ApiKey? (a4d0c3836b6ab16ece5cabf1887128ff6bddf962): [Enter]\n    - Finish code generation with NO error. See current folder for your code!\n\n    * See README.md inside your project folder to continue...\n\n## Security \u0026 Operation commands\n\n    1. npm run monitor-metric   --displaying operation metrics: Invocations, Errors, Durations, Concurrency, Throttles\n    2. npm run monitor-config   --displaying configurations: CodeSize, MemorySize, Timeout, Runtime, LastModified\n    3. npm run security-check   --checking for consistency: check code function hash, code layers' hashes, security setup\n    4. npm run security-patch   --patching for secure encryption: secure function environment, secure log with KMS CMK\n    5. npm run take-snapshot    --recording for consistency: save code function hash, code layers' hashes and configuration\n\n    See [Simplify SecOps](https://github.com/simplify-framework/security) for detail commands and optionnal parameters...\n\n## HOW TO: Test your GraphQL API server\n```JavaScript\nconst Queries = `\nquery GetBooksAndAuthors {\n    listBooks {\n        title\n        author {\n            id\n            name\n            type\n        }\n    }\n}\n\nmutation CreateNewBook {\n    addBook(title: \"Fox in Socks\",\n    author: {\n        name: \"Dr. Seuss\"\n    })\n    {\n        title\n        author {\n            name\n        }\n    }\n}`\n\nlet GetBooksAndAuthors = {\n    \"operationName\": \"GetBooksAndAuthors\",\n    \"variables\": {},\n    \"query\": Queries\n}\n\nfetch(\"https://y5m4j8o1v5.execute-api.eu-west-1.amazonaws.com/demo/book/user\", {\n    \"headers\": {\n        \"content-type\": \"application/json\"\n    },\n    \"body\": JSON.stringify(GetBooksAndAuthors),\n    \"method\": \"POST\",\n    \"mode\": \"cors\"\n}).then(response =\u003e response.json()).then(json =\u003e console.log(json));\n```\n\n## Using CURL with local development server\n\ncurl -X POST -d '{ \"operationName\": \"GetBooksAndAuthors\", \"variables\": {}, \"query\": \"query GetBooksAndAuthors { listBooks { title } }\"}' -H 'content-type:application/json' http://localhost:4000/graphql\n\n## The StarWars Verbal Architecture Model\n```\n### Verbal Architecture Design - GSAM ###\n### Copyright@2020 Simplify Framework ###\n\n* @GraphQLServer Name=StarwarServerQuery run on LAMBDA\n    FOR EVERY (Query)\n        POST /query using NONE authorization with ApiKey=false\n            listBooks [StarwarServerQuery=GraphQLEndpoint, ] =\u003e ListType() will execute @GraphQLResolver=listBookFunction\n            getBook [title=String] =\u003e NamedType() will execute @GraphQLResolverSet=getBookFunction\n                    Function=checkBookExisted() onSuccess=getExistingBook() onFailure=doneGetBook() RetryOnFailure=3\n                    Function=getExistingBook() onSuccess=doneGetBook() onFailure=ERROR() RetryOnFailure=\n                    Function=doneGetBook() onSuccess=DONE() onFailure=ERROR() RetryOnFailure=\n        * StarWarsBookCacheSpace HAS KEY=id AND INDEX=author\n    \n* @GraphQLServer Name=StarwarServerMutation run on LAMBDA\n    FOR EVERY (Mutation)\n        POST /book/admin using SIGV4 authorization with ApiKey=false\n            addBook [title=String, author=AuthorInput] =\u003e ListType() will execute @GraphQLResolverSet=addBookFunctionSet\n                    Function=checkBookExisted() onSuccess=addNewBook() onFailure=doneNewBook() RetryOnFailure=3\n                    Function=addNewBook() onSuccess=doneNewBook() onFailure=errorNewBook() RetryOnFailure=\n                    Function=doneNewBook() onSuccess=DONE() onFailure=ERROR() RetryOnFailure=\n                    Function=errorNewBook() onSuccess=DONE() onFailure=ERROR() RetryOnFailure=\n            deleteBook [title=String, author=AuthorInput] =\u003e NamedType() will execute @GraphQLResolver=deleteBookFunction\n        POST /book/user using COGNITO authorization with ApiKey=false\n            readBook [title=String, author=AuthorInput] =\u003e NamedType() will execute @GraphQLResolver=readBookFunction\n                    Method=checkBookPaid() onSuccess=readNewBook() onFailure=errorPaidBook() RetryOnFailure=\n                    Method=readNewBook() onSuccess=doneReadBook() onFailure=ERROR() RetryOnFailure=\n                    Method=doneReadBook() onSuccess=DONE() onFailure=ERROR() RetryOnFailure=\n                    Method=errorPaidBook() onSuccess=DONE() onFailure=ERROR() RetryOnFailure=\n            likeBook [title=String, author=AuthorInput] =\u003e NamedType() will execute @GraphQLResolver=likeBookFunction\n        * StarWarsBookTable HAS KEY=id AND INDEX=author\n        * StarWarsAuthorTable HAS KEY=id AND INDEX=name\n    \n\n\n* [Query] connects to DataSource=CASSANDRA @alias=StarWarsQuery has Tables=StarWarsBookCache[:id #author]\n* [Mutation] connects to DataSource=DYNAMODB @alias=StarWarsMutation has Tables=StarWarsBook[:id #author],StarWarsAuthor[:id #name]\n\n* [DataInput] AuthorInput { name=[object Object], type=[object Object]  }\n\n* [EnumObject] AuthorType { JOURNALIST, SCIENTIST  }\n\n* [DataObject] Book { id=[object Object], title=[object Object], author=[object Object], subauthor=[object Object], comments=[object Object], outofstock=[object Object], types=[object Object], createdDate=[object Object], updatedDate=[object Object]  }\n* [DataObject] NestBook { name=[object Object], id=[object Object]  }\n* [DataObject] Author { id=[object Object], name=[object Object], type=[object Object], ref=[object Object]  }\n- [DataObject] Query { listBooks (...) getBook (...)  }\n- [DataObject] Mutation { addBook (...) deleteBook (...) readBook (...) likeBook (...)  }\n\n```\n\n## MyStarWars on AWS Stack CloudFormation Design\n\n![MyStarWars](https://github.com/simplify-framework/graphql/blob/1a36f73c4e2d9c256b40dca622a3a46248bf843a/templates/cfn-designer.png?raw=true)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplify-framework%2Fgraphql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimplify-framework%2Fgraphql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplify-framework%2Fgraphql/lists"}