How does one overwrite an auto-generated resolver with a pipeline resolver
See original GitHub issueWhich Category is your question related to? amplify api
What AWS Services are you utilizing? AppSync with @key directive
Provide additional details e.g. code snippets I have the following schema
type A
@model(queries: null, mutations: null)
@key(
name: "ByBbyC"
fields: ["id", "status", "createdAt"]
queryField: "AbyBbyC"
) {
id: ID
status: Status!
createdAt: String
}
and I’m trying to attach a custom pipeline resolver to the query AbyBbyC
in the stack under stacks/
"OrdersByRestaurantByStatusResolver": {
"..."
"Type": "AWS::AppSync::Resolver",
"Properties": {
"..."
"Kind": "PIPELINE",
"TypeName": "Query",
"FieldName": "AbyBbyC",
}
}
I get the following error after doing an amplify push
Resource Name: OrdersByRestaurantByStatusResolver (AWS::AppSync::Resolver)
Event Type: create
Reason: Only one resolver is allowed per field. (Service: AWSAppSync; Status Code: 400; Error Code: BadRequestException; Request ID: xxx)
Thanks
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
AWS amplify overriding an auto generated ... - Stack Overflow
I overriden an auto generated pipline resolver (just the res.vtl file) using this gide ...
Read more >API (GraphQL) - Overwrite & customize resolvers - Amplify Docs
Resolvers are the mechanism by which requests are fulfilled. Learn how to overwrite or add custom resolvers with Amplify. - AWS Amplify Docs....
Read more >Pipeline resolvers (VTL) - AWS AppSync
AWS AppSync executes resolvers on a GraphQL field. In some cases, applications require executing multiple operations to resolve a single GraphQL field.
Read more >Aws Amplify Overriding An Auto Generated Pipeline ... - ADocLib
If you want to override auto generated queries or mutations you can use the CRUDResolver to manually define your resolver.Resolvers work the same...
Read more >Direct Lambda Resolvers with AWS Amplify and AppSync
If you go to your AppSync console, click on schema and search Todo inside the Resolvers search field, and scroll down to task...
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
@mikeparisstuff can you please explain or link a resource explaining how to do this? I didn’t completely understand what you are trying to say - first of all I don’t know how to do step 4 and 5, and after doing those how do I add the functions and set the order of calling them (like creating a pipeline resolver from the AppSync console)
This issue has been automatically locked since there hasn’t been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server
*-help
channels for those types of questions.