apollo-kotlin
apollo-kotlin copied to clipboard
How to handle key which is present in graphqls but not available on server side?
Question
In my mobile application on graphqls file I have few objects which will be added later on server side. If my try to run the code the app crashes since the server doesn't respond with those keys. How can I make those optional or ignore them?
Are trying to query fields that your server does not support? If yes, there's no silver bullet there. You'll either have to edit your queries to remove those fields or edit your server to support them.
I can think of possible alternative workarounds (mockserver, interceptor) but it's hard to tell without more context. Can you share your query/crash?
@wishygupta anything else we can help with here?
Closing. Let us know if anything comes up
Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo Kotlin usage and allow us to serve you better.
Woops, I should have closed this one as "not planned" to avoid the message bot. Sotty about this @wishygupta but yes, if you have any feedback please leave it here or in the survey!