I'm calling an API where a field is optional and for some records it will not exists so it won't return e.g:
...
media_gallery {
url
label,
... on ProductVideo {
video_content {
video_url
}
}
}
...
In this case above video_content
object for some record it will not return. I've searched the web and apply various possible fix but not luck, one being fragments and possible types ref:https://www.apollographql.com/docs/react/data/fragments/#fragment-matcher, apply all of them without errors but the issue still persists.
Anyone has any idea how to make apollo understand that this field is optional?
Thanks