A user reported the following scenario:
I tried a query with multiple statements that are inside an "or"-block. This works when all of the statements return something, like here: https://doc.wikimedia.org/Wikibase/master/js/graphql-explorer/?query=cXVlcnkgc2VhcmNoSXRlbXMgewogIHNlYXJjaEl0ZW1zKAogICAgcXVlcnk6IHsKICAgICAgb3I6IFsKICAgICAgICB7IHByb3BlcnR5OiAiUDM3MyIsIHZhbHVlOiAiSGFtYnVyZyIgfSwKICAgICAgICB7IHByb3BlcnR5OiAiUDM3MyIsIHZhbHVlOiAiQmVybGluIiB9LAogICAgICBdCiAgICB9CiAgKSB7CiAgICBlZGdlcyB7CiAgICAgIG5vZGUgewogICAgICAgIGlkCiAgICAgICAgbGFiZWwobGFuZ3VhZ2VDb2RlOiAiZW4iKQogICAgICB9CiAgICB9CiAgfQp9
But when adding a single statement to the "or"-block that doesn't return a result, the whole result is empty. I would intuitively expect that the results of the other statements would be included in the result:
They are unsure if this is a bug and if not, is there a way around it?
AC:
- Figure out if this is expected behaviour or not
- If this is expected behaviour, we should document this/the underlying logic properly or throw an appropriate error message if that's possible
- If this is not expected behaviour, is it caused by the GraphQL API design or is caused due to the underlying CirrusSearch logic?
- Fix underlying issue if it's in the API design - either by throwing an appropiate error or solving for it