{"id":13532824,"url":"https://github.com/sbstjn/appsync-resolvers-example","last_synced_at":"2025-07-04T10:03:37.751Z","repository":{"id":137670535,"uuid":"136127727","full_name":"sbstjn/appsync-resolvers-example","owner":"sbstjn","description":"Example project for AppSync, GraphQL, and AWS Lambda resolvers using Go.","archived":false,"fork":false,"pushed_at":"2018-09-18T17:42:06.000Z","size":170,"stargazers_count":62,"open_issues_count":1,"forks_count":14,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-01T16:24:23.628Z","etag":null,"topics":["appsync","appsync-resolvers","aws","example","go","golang","graphql","lambda","resolvers"],"latest_commit_sha":null,"homepage":"https://sbstjn.com/serverless-graphql-with-appsync-and-lambda.html","language":"Go","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/sbstjn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-06-05T06:01:12.000Z","updated_at":"2023-06-03T17:12:45.000Z","dependencies_parsed_at":"2024-01-14T02:02:15.546Z","dependency_job_id":"6f4b3829-defc-49dd-9881-e41364f3383c","html_url":"https://github.com/sbstjn/appsync-resolvers-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbstjn%2Fappsync-resolvers-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbstjn%2Fappsync-resolvers-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbstjn%2Fappsync-resolvers-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbstjn%2Fappsync-resolvers-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sbstjn","download_url":"https://codeload.github.com/sbstjn/appsync-resolvers-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250145311,"owners_count":21382392,"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":["appsync","appsync-resolvers","aws","example","go","golang","graphql","lambda","resolvers"],"created_at":"2024-08-01T07:01:14.056Z","updated_at":"2025-04-21T22:33:23.156Z","avatar_url":"https://github.com/sbstjn.png","language":"Go","funding_links":[],"categories":["Example Projects"],"sub_categories":[],"readme":"# AWS AppSync Resolvers w/ CloudFormation, Lambda \u0026 SAM\n\n[![MIT License](https://badgen.now.sh/badge/License/MIT/blue)](https://github.com/sbstjn/appsync-resolvers-example/blob/master/LICENSE.md)\n[![Read Tutorial](https://badgen.now.sh/badge/Read/Tutorial/orange)](https://sbstjn.com/serverless-graphql-with-appsync-and-lambda.html)\n[![Code Library](https://badgen.now.sh/badge/Code/Library/cyan)](https://github.com/sbstjn/appsync-resolvers)\n\nFully working GraphQL API example project using [appsync-resolvers] for AWS AppSync and *ready to be deployed* with CloudFormation using the [Serverless Application Model]. Includes AWS Lambda functions for custom `Query` and `Field` resolvers written in Go. You only need the `aws` CLI application and no other third-party frameworks!\u0026nbsp; 🎉\n\nSee [Serverless GraphQL with AWS AppSync and Lambda](https://sbstjn.com/serverless-graphql-with-appsync-and-lambda.html) on [sbstjn.com](https://sbstjn.com) for a detailed guide how to set up and configure this project. Or just run `make configure build package deploy` and you are ready to go …\n\n## Schema\n\n```graphql\ntype Person {\n    id: Int!\n    name: String!\n    age: Int!\n\n    friends: [Person!]!\n}\n\ntype Query {\n    people: [Person!]!\n    person(id: Int): Person!\n}\n\nschema {\n    query: Query\n}\n```\n\n## Configuration\n\nThe `Makefile` contains all tasks to set up the CloudFormation stack.\n\n```bash\n# Install Go dependencies\n$ \u003e make install\n\n# Create S3 Bucket to store deploy artifacts\n$ \u003e make configure\n\n# Build go binary for AWS Lambda\n$ \u003e make build\n\n# Create deployable artifact\n$ \u003e make package\n\n# Deploy CloudFormation stack\n$ \u003e make deploy\n```\n\n## Usage\n\n```bash\n# Show CloudFormation stack output\n$ \u003e make outputs\n\n[\n  {\n    \"OutputKey\": \"APIKey\",\n    \"OutputValue\": \"da2-jlewwo38ojcrfasc3dpaxqgxcc\",\n    \"Description\": \"API Key\"\n  },\n  {\n    \"OutputKey\": \"GraphQL\",\n    \"OutputValue\": \"https://3mhugdjvrzeclk5ssrc7qzjpxn.appsync-api.eu-west-1.amazonaws.com/graphql\",\n    \"Description\": \"GraphQL URL\"\n  }\n]\n```\n\n### Send GraphQL Requests\n\n#### Request list of all people\n\n```bash\n$ \u003e curl \\\n    -XPOST https://3mhugdjvrzeclk5ssrc7qzjpxn.appsync-api.eu-west-1.amazonaws.com/graphql \\\n    -H \"Content-Type:application/graphql\" \\\n    -H \"x-api-key:da2-jlewwo38ojcrfasc3dpaxqgxcc\" \\\n    -d '{ \"query\": \"query { people { name } }\" }' | jq\n```\n\n```json\n{\n  \"data\": {\n    \"people\": [\n      {\n        \"name\": \"Frank Ocean\"\n      },\n      {\n        \"name\": \"Paul Gascoigne\"\n      },\n      {\n        \"name\": \"Uwe Seeler\"\n      }\n    ]\n  }\n}\n```\n\n#### Request specific person\n\n```bash\n$ \u003e curl \\\n    -XPOST https://3mhugdjvrzeclk5ssrc7qzjpxn.appsync-api.eu-west-1.amazonaws.com/graphql \\\n    -H \"Content-Type:application/graphql\" \\\n    -H \"x-api-key:da2-jlewwo38ojcrfasc3dpaxqgxcc\" \\\n    -d '{ \"query\": \"query { person(id: 2) { name friends { name } } }\" }' | jq\n```\n\n```json\n{\n  \"data\": {\n    \"person\": {\n      \"name\": \"Paul Gascoigne\",\n      \"friends\": [\n        {\n          \"name\": \"Frank Ocean\"\n        }\n      ]\n    }\n  }\n}\n```\n\n## License\n\nFeel free to use the code, it's released using the [MIT license](LICENSE.md).\n\n## Contribution\n\nYou are welcome to contribute to this project! 😘 \n\nTo make sure you have a pleasant experience, please read the [code of conduct](CODE_OF_CONDUCT.md). It outlines core values and beliefs and will make working together a happier experience.\n\n[appsync-resolvers]: https://github.com/sbstjn/appsync-resolvers\n[Serverless Application Model]: https://github.com/awslabs/serverless-application-model\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbstjn%2Fappsync-resolvers-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsbstjn%2Fappsync-resolvers-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbstjn%2Fappsync-resolvers-example/lists"}