-
Notifications
You must be signed in to change notification settings - Fork 274
Description
Description
I have an existing AppSync API that I need to use in a new flutter app. After initializing amplify in my project, i run the command "amplify add codegen --apiId xxxxxxxxxxxxxxxxx"
This results in a message saying "Successfully added API xxxx to your amplify project" but then says "Flutter Only supports the command $amplify codegen models."
When I run amplify codegen models, it says No Appsync API configured. Please add an API. When I run amplify status, it shows the API ,but with no provider plugin. If I update the backend-config.json in amplify/backend directory with the awscloudformation provider plugin, and run either amplify push or amplify codegen models it tells me there is no API folder in amplify/backend
Has anyone had success getting codegen to work for an existing appsync api with Flutter? I have tried everything.
Categories
- Analytics
- API (REST)
- API (GraphQL)
- Auth
- Authenticator
- DataStore
- Storage
Steps to Reproduce
No response
Screenshots
No response
Platforms
- iOS
- Android
- Web
- macOS
- Windows
- Linux
Android Device/Emulator API Level
No response
Environment
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.3.9, on macOS 13.0.1 22A400 darwin-arm, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
[✓] Xcode - develop for iOS and macOS (Xcode 14.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.3)
[✓] VS Code (version 1.73.1)
[✓] VS Code (version 1.63.0)
[✓] Connected device (4 available)
[✓] HTTP Host AvailabilityDependencies
dependencies:
- amplify_api 0.6.10 [amplify_api_android amplify_api_ios amplify_core amplify_flutter aws_common collection flutter meta plugin_platform_interface]
- amplify_auth_cognito 0.6.10 [amplify_auth_cognito_android amplify_auth_cognito_ios amplify_core aws_common collection flutter meta plugin_platform_interface]
- amplify_flutter 0.6.10 [amplify_core amplify_datastore_plugin_interface amplify_flutter_android amplify_flutter_ios aws_common collection flutter meta plugin_platform_interface]
- another_flushbar 1.12.29 [flutter]
- cupertino_icons 1.0.5
- flex_color_scheme 6.1.1 [flex_seed_scheme flutter meta]
- flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine]
- flutter_localizations 0.0.0 [flutter intl characters clock collection material_color_utilities meta path vector_math]
- flutter_markdown 0.6.13 [flutter markdown meta path]
- flutter_screenutil 5.6.0 [flutter]
- flutter_spinkit 5.1.0 [flutter]
- google_fonts 3.0.1 [flutter http path_provider crypto]
- provider 6.0.4 [collection flutter nested]
- shared_preferences 2.0.15 [flutter shared_preferences_android shared_preferences_ios shared_preferences_linux shared_preferences_macos shared_preferences_platform_interface shared_preferences_web shared_preferences_windows]
- string_validator 0.3.0Device
IPhone 14
OS
IOS 14
Deployment Method
Amplify CLI
CLI Version
No response
Additional Context
No response
Amplify Config
const amplifyconfig = ''' {
"UserAgent": "aws-amplify-cli/2.0",
"Version": "1.0",
"auth": {
"plugins": {
"awsCognitoAuthPlugin": {
"UserAgent": "aws-amplify-cli/0.1.0",
"Version": "0.1.0",
"IdentityManager": {
"Default": {}
},
"CognitoUserPool": {
"Default": {
"PoolId": "",
"AppClientId": "",
"Region": ""
}
},
"Auth": {
"Default": {
"OAuth": {
"WebDomain": "",
"AppClientId": "",
"SignInRedirectURI": "http://localhost:3000/",
"SignOutRedirectURI": "http://localhost:3000/signout",
"Scopes": [
"email",
"openid",
"profile"
]
},
"authenticationFlowType": "USER_SRP_AUTH",
"socialProviders": [],
"usernameAttributes": [
"EMAIL"
],
"signupAttributes": [],
"passwordProtectionSettings": {
"passwordPolicyMinLength": 8,
"passwordPolicyCharacters": [
"REQUIRES_LOWERCASE",
"REQUIRES_UPPERCASE"
]
},
"mfaConfiguration": "OFF",
"mfaTypes": [],
"verificationMechanisms": [
"EMAIL"
]
}
}
}
}
}
}''';