I've changed my project dependency version from 1.0.0-alpha3 to 1.0.0-alpha4 makes the code to thrown ApolloException, returning HTTP 400 Bad Request.
Changing back, makes the whole code to run smoothly. What could be?
well 400 comes from the server, smth it doesn't like. We did changed the actual payload we sent to the server, it might be that field extensions it doesn't like but it part of the spec.
I am also experiencing the same issue.
After changing to version 1.0.0-alpha4 all previously working requests now throw a ApolloHttpException: HTTP 400
The same for my project.
I compared one of my queries between the 2 versions.
With 1.0.0-alpha3 this is sent:
{"query":"query LocationQuery { location { __typename country { __typename code } }}","operationName":"LocationQuery","variables":{}}
With 1.0.0-alpha4 this is sent:
{"operationName":"LocationQuery","variables":{},"extensions":{"persistedQuery":{"version":1,"sha256Hash":"ea1c08defd121be8b3555bb8a2d42ddd1d888df8db4d249c0500e3ca03171e10"}},"query":"query LocationQuery { location { __typename country { __typename code } }}"}
The difference is the new extensions field. Could this be the cause and if this is the expected behavior how should we deal with it?
Same here.
Getting "provided sha does not match query"
Are you guys see the same issue provided sha does not match query?
If yes then fix is coming https://github.com/apollographql/apollo-android/pull/1185
Yes I get provided sha does not match query
ok folks #1185 was merged, pls check the snapshot version if it works for you
Is this the correct version for the snapshot?
com.apollographql.apollo:apollo-gradle-plugin:1.0.1-SNAPSHOT
If this is the correct version, the issue is fixed. I no longer get HTTP 400
Closing, new release will be next week
After updating 1.0.1-SNAPSHOT still getting this issue of 400.
Most helpful comment
After updating 1.0.1-SNAPSHOT still getting this issue of 400.