-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GraphQL interfaces breaking builds/deploys since 11 #2956
Comments
Hey,👋 thanks for raising this! I'm going to transfer this over to our API repository for better assistance 🙂 |
Hi @AnilMaktala, If it helps, the app below built, deployed, and is currently running using the same schema (more or less). We still have it pinned to 10.8.1 in build settings and I assume it hasn't been deployed since before the Project Identifier: f70ad9709259f0ce4eade22db19e620b Thanks for your attention to this. We've been using an interface for years in Amplify with no problems. I probably wouldn't even be reporting this now if we could still just build/deploy w/ 10.8.1, although that isn't ideal. |
@AnilMaktala |
Hey @whunter, Thanks for sharing the project identifier. We can reproduce this issue in both latest and 10.8.1 versions. are you sure no other changes was done in the schema? As workaround, Can try creating two search queries for models (collection and Archieve) implementing the interface instead one search query using the common interface? |
After further investigation, I found that despite the |
Hi @AnilMaktala If I'm understanding your suggestion correctly, I don't think that will fix our issue. The use case for our interface is to allow us to return both Collection and Archive records from the same query. Then users can filter them as needed. Example here: https://digital.lib.vt.edu/search. You can filter with "Category" on the left. |
Hi @whunter, Thanks for providing the additional information. We will investigate further to identify the root cause. |
Hey @whunter, Codegen's As a temporary solution, we have got a tagged release to skip modelgen if datastore isn't enabled. Please use the below version and let us know if you still run into issues.
|
@sundersc Hey, that worked! Thanks so much. 🥳 I just deployed an empty app with a stripped down schema but it references an interface, so it should be good? I'll try deploying some of our actual dev apps and see what happens |
@sundersc I've updated our development apps and this version has resolved our issue. Works great. Can we just stay pinned to this version until this (or similar) makes it's way into an official release? Thanks! |
That's a great news. Yes, this version is good to use. Regarding the interfaces support, it is still not supported on 'generate models' command. But this shouldn't impact if you are not using datastore or amplify studio. We will keep this issue open to address the bug with |
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
20.17.0
Amplify CLI Version
12.13.0
What operating system are you using?
Mac
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
updated nodejs runtime in lambda
Describe the bug
Beginning in Amplify 10 (I think) we started seeing this warning on builds because we're using an interface in our schema.graphql. They would not cause builds to fail though. We've had our builds pinned to 10.8.1 which does still support interfaces.
Beginning in Amplify 11, this began causing builds to fail.
And we can no longer pin to 10.8.1, because it seemingly tries to build node14 lambdas regardless of what we put in our cloudformation templates. So those break now as well and we can't build our app at all.
Expected behavior
Amplify build/deploy shouldn't require that all GraphQL return types have
@model
. That isn't always the case. (interfaces | unions)Reproduction steps
Project Identifier
Amplify app id: d2ysrrdhih4bgc
Log output
Additional information
No response
Before submitting, please confirm:
The text was updated successfully, but these errors were encountered: