I understand the confusion.
Let's start with what you should do, and then I'll explain the "why" after.
The recommended approach for using a GraphQL based API is using Amplify API (GraphQL). To do so, you generate the models using amplify codegen models . This generates Swift model files in your project under the AmplifyModels directory. When you do an amplify push, you'll answer no to the question Do you want to generate code for your newly created GraphQL API?. If you've already answered Yes to this in your existing project, you should delete the API.Swift file it generated and, if necessary, remove your project's dependency on the AWS AppSync SDK.
Now, the "why."
As I mentioned above, I understand the confusion. We'd like to make this clearer. Amplify CLI also supports generating an API.swift file for directly using the AWS AppSync SDK (without Amplify).
If you want to use AWS AppSync SDK by itself, you'd answer Yes to the question Do you want to generate code for your newly created GraphQL API?.
If you want to use Amplify, including the API (GraphQL) category, you'd run amplify codegen models and answer No to the question Do you want to generate code for your newly created GraphQL API? that comes when running amplify push.
I hope that helps. Please let me know if you have any other questions. Thanks!