agrosner
11/05/2025, 10:05 PM@catch(to: RESULT) on a field that includes a fragment. Im finding that the json streamer is picking up the wrong type on rewind, and trying to parse wrong object (the field's that failed) as the parent type after failure occurs. example in 🧵agrosner
11/05/2025, 10:09 PMfragment SomeParentFragment on SomeCoreListingCollection {
...CoreListingCollectionTopLevelFragment
collection @catch(to: RESULT) {
...SomeOtherListingCollectionTemplateInnerFragment
}
}
when there is a failure in response,
"node"{
"__typename": "SomeCoreListingCollection",
"id": "someId",
"blockId": 123456,
"collection": {
"__typename": "SomeOtherListingCollection" <--- trying to parse this inner object uding the `SomeCoreListingCollection`'s Adapter
},
}
"extensions": {
"valueCompletion": [
{
"message": "Cannot return null for non-nullable field SomeOtherListingCollection",
"path": [
"someExperience",
"dynamicPaginatedBlocks",
"edges",
4,
"node",
"collection"
]
}
]agrosner
11/05/2025, 10:13 PMoverride fun fromJson(reader: JsonReader, customScalarAdapters: CustomScalarAdapters): com.***.fragment.SomeCoreListingCollectionTemplateFragment {
var __typename: String? = null
var _collection: FieldResult<com.***.fragment.SomeCoreListingCollectionTemplateFragment.Collection?>? = null
while (true) {
when (reader.selectName(RESPONSE_NAMES)) {
0 -> __typename = StringAdapter.fromJson(reader, customScalarAdapters)
1 -> _collection = Collection.obj(true).nullable().errorAware().catchToResult().fromJson(reader, customScalarAdapters)
else -> break
}
}
reader.rewind() <— rewind fails?
val _coreListingCollectionTopLevelFragment = com.***.fragment.CoreListingCollectionTopLevelFragmentImpl_ResponseAdapter.CoreListingCollectionTopLevelFragment.fromJson(reader, customScalarAdapters)
return com.***.fragment.CoreProductRecsListingCollectionTemplateFragment(
__typename = __typename ?: missingField(reader, "__typename"),
collection = _collection ?: missingField(reader, "collection"),
coreListingCollectionTopLevelFragment = _coreListingCollectionTopLevelFragment
)
}agrosner
11/05/2025, 10:16 PMSomeCoreListingCollectionTemplateFragment) adapter on the collection child itself. for its peeked data is the
"__typename": "SomeOtherListingCollection"
inside colleciton field. not the top levelmbonnin
11/05/2025, 10:44 PMcollection is a merged field that has different @catch directives?agrosner
11/05/2025, 10:57 PMmbonnin
11/05/2025, 11:03 PMcollection queried through another path in your query?mbonnin
11/05/2025, 11:11 PMmbonnin
11/05/2025, 11:12 PMmbonnin
11/05/2025, 11:15 PMendObject() being skipped because an exception was thrownagrosner
11/05/2025, 11:21 PMmbonnin
11/05/2025, 11:23 PMmbonnin
11/05/2025, 11:23 PMagrosner
11/05/2025, 11:27 PMagrosner
11/05/2025, 11:27 PMmbonnin
11/05/2025, 11:33 PMmbonnin
11/05/2025, 11:33 PMtry {} finally {} but even that is not enough because we need to actually consume (==skip) remaining entriesmbonnin
11/05/2025, 11:34 PM@catchmbonnin
11/05/2025, 11:52 PMagrosner
11/05/2025, 11:56 PMmbonnin
11/06/2025, 12:30 AMagrosner
11/06/2025, 2:27 AMagrosner
11/06/2025, 2:27 AMmbonnin
11/06/2025, 8:15 AMagrosner
11/06/2025, 3:20 PMagrosner
11/06/2025, 3:22 PMDue to a bug with the underlying service we rely on to provide SNAPSHOT hosting, we've had to temporarily remove browse access for SNAPSHOT releases. You should still be able to publish and consume SNAPSHOT releases as usual, but you cannot browse them via the UI.mbonnin
11/06/2025, 3:27 PMmbonnin
11/06/2025, 3:27 PMmbonnin
11/06/2025, 3:27 PM5.0.0-alpha.3-SNAPSHOTmbonnin
11/06/2025, 3:28 PMmaven("<https://central.sonatype.com/repository/maven-snapshots/>")agrosner
11/06/2025, 3:48 PMagrosner
11/06/2025, 8:07 PMmbonnin
11/06/2025, 8:08 PMmbonnin
11/06/2025, 8:11 PMagrosner
11/06/2025, 8:24 PMmbonnin
11/06/2025, 8:26 PMagrosner
11/07/2025, 4:24 PMmbonnin
11/07/2025, 4:34 PMmbonnin
11/07/2025, 4:36 PMmbonnin
11/07/2025, 4:38 PMagrosner
11/07/2025, 4:39 PMmbonnin
11/07/2025, 4:39 PMagrosner
11/07/2025, 7:19 PMagrosner
11/07/2025, 7:36 PM