Open jguipi opened 1 month ago
Hey @jguipi, 👋 thanks for raising this! I'm going to transfer this over to our API repository for better assistance 🙂. But refer to https://docs.amplify.aws/gen1/react/build-a-backend/graphqlapi/custom-business-logic/#override-amplify-generated-resolvers providing information on overriding Amplify generated resolvers.
As extra detail, I already copied the autogenerated resolver into the right path
From: amplify/backend/api/DevApi/build/resolvers
To : amplify/backend/api/DevApi/build/tsconfig.resource.json
Is it normal that the file that were autogenerated are not following the naming convention mentioned here. The current files name are presented in the screenshot
Hi @jguipi, Thanks for bringing this up. To override the resolvers, you need to copy the autogenerated resolver from amplify/backend/api/<resource_name>/build/resolvers/
to amplify/backend/api/<resource_name>/resolvers/
. The naming convention in the screenshot is expected for relationship tables. Please let us know if you still encounter any issues.
Hi @jguipi, Thanks for bringing this up. To override the resolvers, you need to copy the autogenerated resolver from
amplify/backend/api/<resource_name>/build/resolvers/
toamplify/backend/api/<resource_name>/resolvers/
. The naming convention in the screenshot is expected for relationship tables. Please let us know if you still encounter any issues.
That was already done, but when I try to add the code in the override.ts
to override the pipeline resolver that fonction is not there.
As shown above, I was not able to found the function in either of those model:
const getChildModel= resources.models['Child'];
const getUserModel = resources.models['User'];
console.log(getChildModel)
console.log(getUserModel)
getChildModel return
getUserModel return
There is no mention of that autogenerated function
Hi @jguipi, Could we arrange a call to explore this issue in detail?
Hey @jguipi, Are you still experiencing this issue?
Hi @jguipi, Could we arrange a call to explore this issue in detail?
Hi ! That would be great since I’m still facing the same issue.
sorry I’m currently on vacation and I don’t have my laptop. Can we have a call when I come back ? After August 10th.
Let me know when you're available. I'm free from 3 PM Montreal time almost every day. (7 PM UTC)
Hey @jguipi , Are you on Discord? If so, could you please share your Discord username with me?
Hey @jguipi , Are you on Discord? If so, could you please share your Discord username with me?
Sure
discord: j.g7636
@jguipi Thanks for sharing your username. I’ll connect with you on Discord.
How did you install the Amplify CLI?
npm install -g @aws-amplify/cli
If applicable, what version of Node.js are you using?
v22.2.0
Amplify CLI Version
12.12.4
What operating system are you using?
mac os 14.5 (23F79)
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
no manual change were made
Describe the bug
This schema is generating an autogenerated pipeline resolver that I'm unable to override using the
amplify/backend/api/myapi/override.ts
schema.graphql
It seems like the key
User.Children
autogenerate, a resolver that I'm unable to override.Override.ts
When I log the following, I'm unable to see the autogenerated pipeline resolver in the data structure:
On the other hand, when I look at the AWS UI I'm able to see the autogenerated function
Expected behavior
Being able to override the pipeline resolver that was automatically generated by amplify
Reproduction steps
Project Identifier
No response
Log output
Additional information
No response
Before submitting, please confirm: