-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(appsync): add support for subscriptions for code-first schema generation #10078
Conversation
Title does not follow the guidelines of Conventional Commits. Please adjust title before merge. |
…asing" This reverts commit f3c77e3.
is the only exposed type that users can access to invoke a response to a mutation. This means | ||
you can make any data source real time by specificy a GraphQL Schema directive on a mutation. | ||
|
||
**Note**: The AWS AppSync client SDK automatically handles subscription connection management. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this something users need to consider when using subscriptions? it's not something they can affect in through their CDK app right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think its nice to have something here because subscriptions are unique to AppSync. Thus for a new person scanning over the README, it would be nice to get a gloss of how that would work.
api.addSubscription('addedPlanets', new appsync.ResolvableField({ | ||
returnType: planet.attribute(), | ||
args: { id: ScalarType.required_id }, | ||
directives: [appsync.Directive.subscribe('addPlanet')], | ||
})); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are there any additional changes to the verification steps because of this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unless we want to build out an entire app to check if subscriptions work then no..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually nvm here is a solution
https://stackoverflow.com/questions/52567681/how-to-test-subscription-in-aws-appsync-console
and another link to testing in general
https://docs.aws.amazon.com/appsync/latest/devguide/test-debug-resolvers.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice work!
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Error in the documentation and type checking. Fixed both the readme and the related PR (integ test used a `Field` type so it still works as intended). Related PR: #10078 Fixes: #16071 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Error in the documentation and type checking. Fixed both the readme and the related PR (integ test used a `Field` type so it still works as intended). Related PR: aws#10078 Fixes: aws#16071 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Error in the documentation and type checking. Fixed both the readme and the related PR (integ test used a `Field` type so it still works as intended). Related PR: aws#10078 Fixes: aws#16071 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Error in the documentation and type checking. Fixed both the readme and the related PR (integ test used a `Field` type so it still works as intended). Related PR: aws#10078 Fixes: aws#16071 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Error in the documentation and type checking. Fixed both the readme and the related PR (integ test used a `Field` type so it still works as intended). Related PR: aws#10078 Fixes: aws#16071 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Implemented an
addSubscription
function for theappsync.Schema
class to make easy schema generation.Fixes: #9345
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license