Closed charlesdarkwind closed 2 years ago
@charlesdarkwind Thanks for the issue, does a file called .graphqlconfig.yml
get generated and can you share its contents?
I am unable to reproduce with 7.6.15
@ammarkarachi sure, here is the file
projects:
projectName-env:
schemaPath: src/graphql/schema.json
includes:
- src/graphql/**/*.ts
excludes:
- ./amplify/**
extensions:
amplify:
codeGenTarget: typescript
generatedFileName: src/API.ts
docsFilePath: src/graphql
region: ca-central-1
apiId: AppSyncApiID
@charlesdarkwind Thanks for the prompt reply. The issue stems from the absence of this flag. If you add this to your amplify/cli.json
{
"features": {
"graphqltransformer": {
"addmissingownerfields": true,
"improvepluralization": false,
"validatetypenamereservedwords": true,
"useexperimentalpipelinedtransformer": true,
"enableiterativegsiupdates": true,
"secondarykeyasgsi": true,
"skipoverridemutationinputtypes": true,
"transformerversion": 2,
"suppressschemamigrationprompt": true,
--->"securityenhancementnotification": false
},
...
}
Should unblock you in the mean time we work on fixing this bug.
@ammarkarachi Thanks, I confirm that this flag fixes the problem.
I tried to add this flag but it didn't fix the issue for me
@charlesdarkwind Thanks for the prompt reply. The issue stems from the absence of this flag. If you add this to your
amplify/cli.json
{ "features": { "graphqltransformer": { "addmissingownerfields": true, "improvepluralization": false, "validatetypenamereservedwords": true, "useexperimentalpipelinedtransformer": true, "enableiterativegsiupdates": true, "secondarykeyasgsi": true, "skipoverridemutationinputtypes": true, "transformerversion": 2, "suppressschemamigrationprompt": true, --->"securityenhancementnotification": false }, ... }
Should unblock you in the mean time we work on fixing this bug.
For me, the following flag was the one that workaround the problem
"showfieldauthnotification": false
"features": {
"graphqltransformer": {
"addmissingownerfields": true,
"improvepluralization": false,
"validatetypenamereservedwords": true,
"useexperimentalpipelinedtransformer": true,
"enableiterativegsiupdates": true,
"secondarykeyasgsi": true,
"skipoverridemutationinputtypes": true,
"transformerversion": 2,
"suppressschemamigrationprompt": true,
"securityenhancementnotification": false,
--->"showfieldauthnotification": false
},
How long does the fix take to be merged into the amplify-cli after it's complete? I updated to 7.6.22 but still seeing the error.
👋 Hi, this issue was referenced in the v7.6.23 release!
Check out the release notes here https://github.com/aws-amplify/amplify-cli/releases/tag/v7.6.23.
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.14
What operating system are you using?
Mac, Windows and Ubuntu
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
No
Amplify Categories
api, hosting
Amplify Commands
publish, push
Describe the bug
The project has no backend or schema definition of its own, it uses manual hosting. The types are generated using
amplify codegen
of types from another appsync API usingamplify codegen
(script used as codegen unfortunetly does not have headless support ):Since we upgraded to this amplify version, the
amplify publish
commands (andamplify push
) give the following error:If we generate an empty file manually then the command succeeds.
mkdir -p amplify/backend/api/appSyncApiName && touch amplify/backend/api/appSyncApiName/schema.graphql
Trying with
7.6.7
was also working.Expected behavior
The
amplify publish --yes
commands runs normally with no errorsReproduction steps
use amplify publish on a minimal project with types generated from another API.
GraphQL schema(s)
Log output
Additional information
Environment information
Bug appears on Windows and Mac with same Amplify version