nhost / hasura-storage

Storage for Hasura built on top of S3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Select permission should not be needed to insert (upload) file

elitan opened this issue · comments

Internally, the storage package should use insertFiles instead of insertFile mutation. Right now it's not possible to give a role insert permission to storage.files without a matching select permission (use case: I want to enable some users to upload files without viewing the uploaded files).
Because:

The single row mutation insert_one shares the returning type with the query field. Hence if no select permissions are defined, the insert_one field will also be omitted from the GraphQL schema.