question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How does one overwrite an auto-generated resolver with a pipeline resolver

See original GitHub issue

Which 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:closed
  • Created 4 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
idanlocommented, Aug 28, 2019

@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)

0reactions
github-actions[bot]commented, May 26, 2021

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found