Skip to content
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

aws-appsync: Support DataSource type NONE #7144

Closed
1 of 2 tasks
christophgysin opened this issue Apr 2, 2020 · 4 comments
Closed
1 of 2 tasks

aws-appsync: Support DataSource type NONE #7144

christophgysin opened this issue Apr 2, 2020 · 4 comments
Assignees
Labels
@aws-cdk/aws-appsync Related to AWS AppSync effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2

Comments

@christophgysin
Copy link
Contributor

Currently aws-appsync only supports data source types AMAZON_DYNAMODB and AWS_LAMBDA. This is a request to add support for type NONE.

Use Case

To trigger GraphQL subscriptions from the backend, it's common to create a mutation that is triggerd by the backend. These don't necessarily need an actual datasource, and the AppSync data source type NONE can be used instead.

Proposed Solution

Add a new type NoneDataSource and a method GraphQLApi.addNoneDataSource().

Other

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

@christophgysin christophgysin added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Apr 2, 2020
christophgysin added a commit to christophgysin/aws-cdk that referenced this issue Apr 2, 2020
@SomayaB SomayaB added the @aws-cdk/aws-appsync Related to AWS AppSync label Apr 3, 2020
@MrArnoldPalmer MrArnoldPalmer added effort/small Small work item – less than a day of effort p2 and removed needs-triage This issue or PR still needs to be triaged. labels Apr 6, 2020
@MrArnoldPalmer
Copy link
Contributor

This makes sense. Do you have any examples we could see of this in use? Just want to understand the use-case a little better.

@christophgysin
Copy link
Contributor Author

A simple use case for a NONE data source is any query that returns static data that is purely defined in VTL.

The use case described in the description above is about a way to send events from the server to the client without actually needing to invoke Lambda or DynamoDB. The schema defines a mutation and a subscription that uses @aws_subscribe() to subscribe to the mutation. The client calls the subscription, and the backend calls the mutation to trigger all subscribed clients.

See also:
https://docs.aws.amazon.com/appsync/latest/devguide/tutorial-local-resolvers.html

@MrArnoldPalmer
Copy link
Contributor

awesome, I ran into those docs but your explanation helps. Checking out the PR.

christophgysin added a commit to christophgysin/aws-cdk that referenced this issue Apr 14, 2020
christophgysin added a commit to christophgysin/aws-cdk that referenced this issue Apr 14, 2020
@christophgysin
Copy link
Contributor Author

fixed in #7145

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-appsync Related to AWS AppSync effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

No branches or pull requests

3 participants