This codebase currently doesn't make use of GraphQL fragments but it seems like, if we were using them, that responseBased codegen would have been a decent middle ground for keeping a lot of the flexibility that using our own models provides us, while still taking full advantage of the convenience of Apollo Client's generated classes. is lost for the classes that have generic type parameters 2.2.3 released 1st February 2023 Client ContentNegotiation: 'Skipping because the type is ignored' log message is unclear FileStorage throws java.io. ![]() Which does make our codebase cleaner and less dependent overall on Apollo itself, but now I'm kinda kicking myself for not investigating Apollo 3's responseBased codegen any further. That having been said though, in my work project I just got done isolating the generated models from the rest of the codebase by using our own model layer that mimics Apollo's generated classes (converting any missing fields to nullable types). ![]() This article was a good read and helped me understand the reasoning behind making this decision. ![]() It's always bothered me that Apollo Client models its classes off of your queries and mutations rather than the schema itself. Been using Apollo Android / Apollo Kotlin for several years now (off and on).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |