aws-amplify / docs

AWS Amplify Framework Documentation
https://docs.amplify.aws
Apache License 2.0
477 stars 1.01k forks source link

How do i migrate from AWS appsync sdk to Amplify #6716

Closed sunnyeverestek closed 5 months ago

sunnyeverestek commented 6 months ago

I am using AWS appsync sdk for android from more then 2 years which is good but due boilerplate code i want to migrate my graph ql code to Amplify graphql API.

I followed the documentation but there are lots of confusion for generation of models and schema. For swift it is perfectly documented how to migrated from AWS appsync to Amplify but not for android.

Please add step by step migrations from Aws AppSync sdk to amplify Graph ql Api for android as well or you can guide me as well by replying here

Please check my below code it is throwing disposable value null.

`GraphQLRequest request = new SimpleGraphQLRequest<>( query.queryDocument(), query.variables().valueMap(), UserQuery.User.class, new GsonVariablesSerializer() );

    Disposable dis = RxAmplify.API.query("WOWE_AMAZON_COGNITO_USER_POOLS", request)
            .subscribeOn(Schedulers.io())
            .observeOn(AndroidSchedulers.mainThread())
            .subscribe(user ->{
                Logger.getInstance().error(user.getData().userData());
               } , throwable -> Logger.getInstance().error(throwable.toString()));

    disposable.add(dis);`
ankpshah commented 6 months ago

Hello, Thank you for your report. A member of our team will take a look at this.

gpanshu commented 6 months ago

Hi @sunnyeverestek can you point to the doc links for Swift that are more clear than Android's ? The platforms should be at par so if there is a gap we can plug that in and provide more context where missing.

tylerjroach commented 6 months ago

Hi @sunnyeverestek,

The AppSync SDK for iOS is in maintenance mode and reaching end of life. The Swift team added suport to Amplify Swift, to support the migration path from AppSync SDK to Amplify Swift.

The AppSync SDK for Android is still fully supported and is not in maintenance mode. It continues to live as its own SDK and Amplify Android does not have support for the AppSync SDK Android models. In order to use an existing AppSync project on Android, you will need to continue to use the AppSync SDK for Android at this time.**

ankpshah commented 5 months ago

Closing this issue due to inactivity. Please feel free to reopen this issue if you have any unanswered query.