How to make documentId in GraphQL queries optional

Unfortunately, that attempt did not work as I still have the documentId as a required argument. However, I used another workaround by making a query on pages where I can use the filters, and then I have to target the first element in the array.