This is not possible directly for the moment, there is no direct query possible for getting results. Although, there is a workaround like you can get all the languages of all the documents in JSON, using the following query:
After getting results in JSON, you can avoid duplicates, using the map or some other function on the lang field of JSON.
Here's Prismic's Graphql documentation.
Let me know if you have any doubt.