Apollo-android: Error on graphql response when minifyEnabled true

Created on 25 Jun 2019  路  7Comments  路  Source: apollographql/apollo-android

I am getting unexpected data on graphql response when minifyEnabled. If I set minifyEnabled false then everything works fine. Do I need to set any procured rule to enable minifyEnabled.
Screenshot 2019-06-25 at 7 05 39 PM
Screenshot 2019-06-25 at 7 06 18 PM

Question

Most helpful comment

If you have all generated code under a certain package you can try doing in your Proguard config

-keepnames com.example.my.api.packge.**

All 7 comments

I believe you should configure to ignore any models generated by apollo plugin

@dhruba1986 Hi, I would like to know how you resolved this

Hi we use minifyEnabled with no special configuration and no issues so far.

Can you post your actual issue?

Hi we use minifyEnabled with no special configuration and no issues so far.

Can you post your actual issue?

I got JSON api response as some random key value pair like "b, c, d, e" as key. I already attached an image of the response in my original question. This happen only on when minifyEnable, otherwise api response is as expected key value pair.

If you have all generated code under a certain package you can try doing in your Proguard config

-keepnames com.example.my.api.packge.**

If you have all generated code under a certain package you can try doing in your Proguard config

-keepnames com.example.my.api.packge.**

thanks a lot, it works. I think this should be mentioned in documentation.

Definitely makes sense to put this into docs. Actually, it is also possible to automate this since Apollo already knows the packages created.

Was this page helpful?
0 / 5 - 0 ratings