So there is this new field added to the server API that the client wants to use. But the client also still needs to work with the older installs of the server that don’t define that field yet.
Unfortunately when I just include the field, I get error that the field does not exist and only the error and no data
.
I also tried introspecting whether the field exist, setting hasNewField
variable and than doing newField @include(if: $hasNewField)
, but that still gives me error that newField
does not exist, even if the hasNewField
variable is false.
Is there any way to conditionally exclude the field or otherwise get the response with the field if it exists and without it if it doesn’t without needing two versions of the query?
The server is using Chilli Cream, but I would prefer a generic solution.