Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make auto generated classes of apollo graphql client, Parcelable

I am using GraphQL with my Android Project. I got into trouble when passing results(objects of the auto-generated class by Apollo in the build folder) to another activity by extras.

How can I make those auto-generated class parcelable?

like image 969
chathura Avatar asked Oct 17 '22 21:10

chathura


1 Answers

Generated classes are not supposed to be edited since the changes would be ignored once the class is regenerated.

You have to create a model class that is parcelable and store the object in that model class, and then you can pass that object.

like image 183
Deepak Avatar answered Oct 20 '22 04:10

Deepak