How to exclude empty types when using fragments? #8812
-
|
I am upgrading the codegen version in my project from 1.1.3 to 2 and have encountered a lot of typescript compatibility issues. My problem is similar to this discussion. I found that the v1.1.3 can exclude these empty types, but the v2 can't. Is there any way now to exclude these empty types? Here is the code demonstration. Thank you very much for this tool. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Hi @zo-ly ! I have to refer again to my comment here: #5567 (reply in thread) |
Beta Was this translation helpful? Give feedback.
Hi @zo-ly !
I'm not sure what feature in v1 allowed to skip/exclude the "empty" types?
I have to refer again to my comment here: #5567 (reply in thread)
Those types are not empty - they represent a real, possible scenario that might happen during the execution of your GraphQL engine. Ignoring these cases while querying might lead to runtime issues.