Does the GraphQL Transformer support Subscriptions with arguments?
See original GitHub issue** Which Category is your question related to? ** GraphQL Transformer, VTL
** What AWS Services are you utilizing? ** AppSync
** Provide additional details e.g. code snippets ** Is there a way to create a subscription that accepts specific arguments in the annotated schema? Such as a subscription for comments on a particular Blog post:
type Subscription {
onCreateComment(postId: ID!) @aws_subscribe(mutations: ["createComment"])
}
And if not yet supported, is there a way to add it as a “pass-thru” so it ends up in the final schema? Currently adding it and running Amplify push deletes it from the annotated schema, not sure if that is by design or is a defect.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
API (GraphQL) - Examples - AWS Amplify Docs
Add the subscriptions argument on the @model directive, telling Amplify to not generate subscriptions for your Comment type.
Read more >Filtering GraphQL Subscriptions with Arguments with AWS ...
When working with real-time data in GraphQL, a very common use case is the need to filter subscriptions based on arguments (think about...
Read more >API Reference: graphql-tools - Apollo GraphQL Docs
The graphql-tools library enables the creation and manipulation of GraphQL schema. Apollo Server is able to accept a schema that has been enabled...
Read more >How to use the graphql-transformer-core.getDirectiveArguments ...
To help you get started, we've selected a few graphql-transformer-core. ... Check if subscriptions is enabled const directiveArguments: ModelDirectiveArgs ...
Read more >AWS Amplify announces the new GraphQL Transformer v2 ...
With the Transformer, developers can configure their backend data model using the GraphQL Schema Definition Language, and Amplify CLI ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Im also a bit lost here. So codegen creates code which is not working when you need an argument as owner for a subscription or? Or how can I pass the owner as input to the subscription in Angular with the generated code?
amplify --version --> 3.0.0
I need some help here. The APIService generated by codegen has generated this function.
I’m trying to call this listener from an angular page but I can not pass the parameter to the function always get “Variable ‘conversationId’ has coerced Null value for NonNull type ‘ID!’”. I have tried in all ways but I can not send it.
This is more or less my code.
Another subscription without parameters, however, it works for me simply by subscribing to it.
Please need help. Thanks you.