{"id":22127898,"url":"https://github.com/sashee/appsync-subscriptions","last_synced_at":"2025-03-24T08:34:49.241Z","repository":{"id":138842123,"uuid":"448846464","full_name":"sashee/appsync-subscriptions","owner":"sashee","description":"Example code for AppSync Subscriptions","archived":false,"fork":false,"pushed_at":"2022-10-22T14:41:51.000Z","size":10,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-29T14:09:50.132Z","etag":null,"topics":["appsync","aws","graphql","terraform"],"latest_commit_sha":null,"homepage":"https://advancedweb.hu/real-time-data-with-appsync-subscriptions/","language":"HCL","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/sashee.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-17T10:23:19.000Z","updated_at":"2023-07-27T12:07:56.000Z","dependencies_parsed_at":"2023-03-28T20:20:10.193Z","dependency_job_id":null,"html_url":"https://github.com/sashee/appsync-subscriptions","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/sashee%2Fappsync-subscriptions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sashee%2Fappsync-subscriptions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sashee%2Fappsync-subscriptions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sashee%2Fappsync-subscriptions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sashee","download_url":"https://codeload.github.com/sashee/appsync-subscriptions/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245235422,"owners_count":20582225,"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","aws","graphql","terraform"],"created_at":"2024-12-01T17:22:12.193Z","updated_at":"2025-03-24T08:34:49.213Z","avatar_url":"https://github.com/sashee.png","language":"HCL","readme":"# Example code for AppSync Subscriptions\n\n## Requirements\n\n* terraform\n* AWS account\n* AWS CLI configured\n\n## Deploy\n\n* ```terraform init```\n* ```terraform apply```\n\n## Use\n\n### Basic filtering\n\nGo to the AWS Management Console and subscribe to new Todo items:\n\n```graphql\nsubscription MySubscription {\n  newTodo(name: \"todo1\") {\n    checked\n    created\n    name\n    id\n  }\n}\n```\n\nOn a separate tab, create a new Todo:\n\n```graphql\nmutation MyMutation {\n  addTodo(name: \"todo1\", userId: \"user1\") {\n    id\n    name\n    created\n    checked\n  }\n}\n```\n\nThere is an event on the first tab. Try again with a different name:\n\n```graphql\nmutation MyMutation {\n  addTodo(name: \"todo5\", userId: \"user1\") {\n    id\n    name\n    created\n    checked\n  }\n}\n```\n\nNo event this time.\n\n### Advanced filtering\n\nSubscribe to the other subscription field:\n\n```graphql\nsubscription MySubscription {\n  todo(userId: \"user1\") {\n    todo {\n      checked\n      created\n      id\n      name\n    }\n  }\n}\n```\n\nCreate a Todo item:\n\n```graphql\nmutation MyMutation {\n  addTodo(name: \"todo5\", userId: \"user1\") {\n    id\n  }\n}\n```\n\nThere is an event. Notice that the Mutation has fewer fields than the Subscription.\n\n## Cleanup\n\n* ```terraform destroy```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsashee%2Fappsync-subscriptions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsashee%2Fappsync-subscriptions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsashee%2Fappsync-subscriptions/lists"}