Resolver pipeline auth function override generates duplicate #9913
Labels
bug
Something isn't working
duplicate
If marked with duplicate, issue will be closed & original will be added for traceability
graphql-transformer-v2
Issue related to GraphQL Transformer v2
p2
Before opening, please confirm:
How did you install the Amplify CLI?
No response
If applicable, what version of Node.js are you using?
No response
Amplify CLI Version
7.6.20
What operating system are you using?
Windows
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
No manual changes made.
Amplify Categories
api
Amplify Commands
Not applicable
Describe the bug
Instead of a pipeline resolver function being overwritten, it is duplicated in the pipeline.
For example, an autogenerated pipeline resolver for getEmployee with authentication has 4 main functions in the AppSync console:
These correspond to below generated functions in the /build directory locally:
When trying to override any of the auth functions, for example,
Query.getAnimal.auth.1.req.vtl
, the function is successfully overwritten, but another function calledQuerygetEmployeeauth1Function
is also generated and is added to the pipeline. So after overridingQuerygetEmployeeauth0Function
, the pipeline will have 5 functions now:The same behaviour does not happen when overriding any of the data resolver function request or response templates (
QueryGetEmployeeDataResolverFn
). Meaning, no duplicates are created.Why is an auth1 function created when overriding the auth function ?
Expected behavior
When overriding an auth0 resolver, no duplicate function called auth1 should be created.
Reproduction steps
GraphQL schema(s)
Log output
Additional information
No response
The text was updated successfully, but these errors were encountered: