aws-amplify / amplify-codegen

Amplify Codegen is a JavaScript toolkit library for frontend and mobile developers building Amplify applications.
Apache License 2.0
59 stars 59 forks source link

fix: return reference behavior to main for all but introspection #824

Closed dpilch closed 5 months ago

dpilch commented 5 months ago

Description of changes

Codegen Paramaters Changed or Added

N/A

Issue #, if available

N/A

Description of how you validated changes

I created a branch from main (https://github.com/aws-amplify/amplify-codegen/tree/main-reference-point) and pulled in all of the references test cases for native platforms. I then wrote the snapshots with the behavior on main.

I then made the changes on this branch to respect references for only the model introspection schema.

Then git diff --stat main-reference-point packages/appsync-modelgen-plugin/src/__tests__/visitors/ and see that there are no changes to the snapshots:

 packages/appsync-modelgen-plugin/src/__tests__/visitors/__snapshots__/appsync-model-introspection-visitor.test.ts.snap | 1061 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 packages/appsync-modelgen-plugin/src/__tests__/visitors/appsync-model-introspection-visitor.test.ts                    |  277 ++++++++++++++++
 packages/appsync-modelgen-plugin/src/__tests__/visitors/appsync-visitor.test.ts    

Checklist

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.