{"action":"created","issue":{"url":"https://api.github.com/repos/apollographql/apollo-android/issues/648","repository_url":"https://api.github.com/repos/apollographql/apollo-android","labels_url":"https://api.github.com/repos/apollographql/apollo-android/issues/648/labels{/name}","comments_url":"https://api.github.com/repos/apollographql/apollo-android/issues/648/comments","events_url":"https://api.github.com/repos/apollographql/apollo-android/issues/648/events","html_url":"https://github.com/apollographql/apollo-android/issues/648","id":254522132,"number":648,"title":"Query variables in request being obfuscated,any proguard rules for generated code?","user":{"login":"80998062","id":15043289,"avatar_url":"https://avatars3.githubusercontent.com/u/15043289?v=4","gravatar_id":"","url":"https://api.github.com/users/80998062","html_url":"https://github.com/80998062","followers_url":"https://api.github.com/users/80998062/followers","following_url":"https://api.github.com/users/80998062/following{/other_user}","gists_url":"https://api.github.com/users/80998062/gists{/gist_id}","starred_url":"https://api.github.com/users/80998062/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/80998062/subscriptions","organizations_url":"https://api.github.com/users/80998062/orgs","repos_url":"https://api.github.com/users/80998062/repos","events_url":"https://api.github.com/users/80998062/events{/privacy}","received_events_url":"https://api.github.com/users/80998062/received_events","type":"User","site_admin":false},"labels":[{"id":523909979,"url":"https://api.github.com/repos/apollographql/apollo-android/labels/Type:%20Bug","name":"Type: Bug","color":"e11d21","default":false},{"id":523910490,"url":"https://api.github.com/repos/apollographql/apollo-android/labels/Type:%20Question","name":"Type: Question","color":"fbca04","default":false},{"id":504847168,"url":"https://api.github.com/repos/apollographql/apollo-android/labels/Type:%20Runtime","name":"Type: Runtime","color":"00e5bf","default":false}],"state":"closed","locked":false,"assignee":{"login":"sav007","id":902816,"avatar_url":"https://avatars2.githubusercontent.com/u/902816?v=4","gravatar_id":"","url":"https://api.github.com/users/sav007","html_url":"https://github.com/sav007","followers_url":"https://api.github.com/users/sav007/followers","following_url":"https://api.github.com/users/sav007/following{/other_user}","gists_url":"https://api.github.com/users/sav007/gists{/gist_id}","starred_url":"https://api.github.com/users/sav007/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sav007/subscriptions","organizations_url":"https://api.github.com/users/sav007/orgs","repos_url":"https://api.github.com/users/sav007/repos","events_url":"https://api.github.com/users/sav007/events{/privacy}","received_events_url":"https://api.github.com/users/sav007/received_events","type":"User","site_admin":false},"assignees":[{"login":"sav007","id":902816,"avatar_url":"https://avatars2.githubusercontent.com/u/902816?v=4","gravatar_id":"","url":"https://api.github.com/users/sav007","html_url":"https://github.com/sav007","followers_url":"https://api.github.com/users/sav007/followers","following_url":"https://api.github.com/users/sav007/following{/other_user}","gists_url":"https://api.github.com/users/sav007/gists{/gist_id}","starred_url":"https://api.github.com/users/sav007/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sav007/subscriptions","organizations_url":"https://api.github.com/users/sav007/orgs","repos_url":"https://api.github.com/users/sav007/repos","events_url":"https://api.github.com/users/sav007/events{/privacy}","received_events_url":"https://api.github.com/users/sav007/received_events","type":"User","site_admin":false}],"milestone":null,"comments":8,"created_at":"2017-09-01T02:54:26Z","updated_at":"2017-09-09T03:45:48Z","closed_at":"2017-09-09T03:45:48Z","author_association":"NONE","body":"After using Proguard, the **apollo-android** totally can't work with the status code **400 Bad Request** as message.\r\n\r\n> the output of trace stacks: \r\n\r\n```\r\nW/System.err: com.b.a.c.c: HTTP 400 Bad Request\r\nW/System.err:     at com.b.a.e.c.b.a(ApolloParseInterceptor.java:95)\r\nW/System.err:     at com.b.a.e.c.b.a(ApolloParseInterceptor.java:48)\r\nW/System.err:     at com.b.a.e.c.e.a(RealApolloInterceptorChain.java:41)\r\nW/System.err:     at com.b.a.e.c.a.a(ApolloCacheInterceptor.java:84)\r\nW/System.err:     at com.b.a.e.c.e.a(RealApolloInterceptorChain.java:41)\r\nW/System.err:     at com.b.a.e.c.a(RealApolloCall.java:128)\r\nW/System.err:     at com.b.a.g.a$1.a(Rx2Apollo.java:83)\r\nW/System.err:     at io.a.e.e.d.a.b(SingleCreate.java:39)\r\nW/System.err:     at io.a.o.a(Single.java:2693)\r\nW/System.err:     at io.a.e.e.d.l.b(SingleMap.java:33)\r\nW/System.err:     at io.a.o.a(Single.java:2693)\r\nW/System.err:     at io.a.e.e.d.o$a.run(SingleSubscribeOn.java:89)\r\nW/System.err:     at io.a.n$1.run(Scheduler.java:138)\r\nW/System.err:     at io.a.e.g.f.run(ScheduledRunnable.java:59)\r\nW/System.err:     at io.a.e.g.f.call(ScheduledRunnable.java:51)...\r\n```\r\n\r\nWhen inspect the network in the Chrome,I found it seems that the **Proguard**  obfuscated too much to change the query variables :\r\n\r\n```json\r\nquery: \"mutation GetAuthCode($phone: String!, $purpose: String!) {  sendPhoneMessage(data: {phone: $phone, purpose: $purpose}) {    __typename    sent  }}\"\r\nvariables: {a: \"15757161279\", b: \"reset_password\"}\r\na: \"15757161279\"\r\nb: \"reset_password\"\r\n```\r\n\r\n>  the `a` and `b` are supposed to be `phone` and `password`\r\n\r\nSo the server returns the status code :**400 Bad Request**.\r\n\r\n\r\n\r\n**Besides**,my snippet related in *proguard-rules.pro* is as follow:\r\n\r\n```\r\n#-keep,allowobfuscation @interface javax.annotation.Generated(\"Apollo GraphQL\")\r\n#-keep @javax.annotation.Generated(\"Apollo GraphQL\") class * {*;}\r\n#-keepclassmembers class * {\r\n#    @javax.annotation.Generated(\"Apollo GraphQL\") *;\r\n#}\r\n\r\n-keep public class * implements com.apollographql.apollo.api.Query\r\n-keep public class * implements com.apollographql.apollo.api.Mutation\r\n```\r\n\r\n (:o 」∠)_but unfortunately it is no use ,so how can I update my proguard rules to *exclude the generated code* by **appollo**?\r\n\r\nSorry that I am unskilled with **Proguard** configuration , if anyone can give me *a working example*,much appreciated. ( ˉ ⌓ ˉ ๑)﻿﻿"},"comment":{"url":"https://api.github.com/repos/apollographql/apollo-android/issues/comments/328251876","html_url":"https://github.com/apollographql/apollo-android/issues/648#issuecomment-328251876","issue_url":"https://api.github.com/repos/apollographql/apollo-android/issues/648","id":328251876,"user":{"login":"sav007","id":902816,"avatar_url":"https://avatars2.githubusercontent.com/u/902816?v=4","gravatar_id":"","url":"https://api.github.com/users/sav007","html_url":"https://github.com/sav007","followers_url":"https://api.github.com/users/sav007/followers","following_url":"https://api.github.com/users/sav007/following{/other_user}","gists_url":"https://api.github.com/users/sav007/gists{/gist_id}","starred_url":"https://api.github.com/users/sav007/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sav007/subscriptions","organizations_url":"https://api.github.com/users/sav007/orgs","repos_url":"https://api.github.com/users/sav007/repos","events_url":"https://api.github.com/users/sav007/events{/privacy}","received_events_url":"https://api.github.com/users/sav007/received_events","type":"User","site_admin":false},"created_at":"2017-09-09T03:45:48Z","updated_at":"2017-09-09T03:45:48Z","author_association":"COLLABORATOR","body":"Closing."}}
{"actor":{"display_login":"sav007"}}