use of com.apollographql.apollo.integration.httpcache.AllPlanetsQuery in project apollo-android by apollographql.
the class ResponseNormalizationTest method list_of_objects_with_null_object.
@Test
public void list_of_objects_with_null_object() throws Exception {
assertHasNoErrors("AllPlanetsListOfObjectWithNullObject.json", new AllPlanetsQuery());
String fieldKey = "allPlanets({\"first\":\"300.0\"})";
Record record = normalizedCache.loadRecord(fieldKey + ".planets.0", CacheHeaders.NONE);
assertThat(record.field("filmConnection")).isNull();
record = normalizedCache.loadRecord(fieldKey + ".planets.0.filmConnection", CacheHeaders.NONE);
assertThat(record).isNull();
record = normalizedCache.loadRecord(fieldKey + ".planets.1.filmConnection", CacheHeaders.NONE);
assertThat(record).isNotNull();
}
Aggregations