I get this error a sorta decent amount. It typical...
# apollo-kotlin
c
I get this error a sorta decent amount. It typically has me guessing and checking (commenting stuff out and back in) to get an idea for what the error actually is.
com.apollographql.apollo3.exception.ApolloParseException: Failed to parse GraphQL http network response
am I missing something on how to identify what line or field is causing the issue
m
There should be more to this exception
There should be
e.cause
or something like this. If you dump everything, it'll say "caused by"
Usually it's a missing field or a bad json
c
Printing out cause or any other field available on exception didn't do anything besides the above message. BUT the debugger did show more info!
2023-03-11 at 18.47.35.png
Hm. It looks like the type generated by apollo after generating the schema, does not match what the backend is telling me the type is. Hmmmmmm
e
toString()
doesn't include cause,
printStackTrace()
does, and most logging frameworks should have a way to include it
c
hm. I tried printStackTrace as well (i just used the ides autocomplete to try to print out anything relevant). i'll try again though. maybe i somehow missed it
m
That's in your Date adapter. Looks like you're trying to parse a
DateTime
while your server only sends Date (no time)
Ah that's your next message 👍
c
Yeah — I thought it was worthy of a new top level question. phew. what a rollercoaster this has been lol