AF
Ash Framework•4mo ago
Vahagn

AshGraphQL mutation with metadata

I want to make a File resource, which will have a path to S3, a filename etc. And I want to define a :create action :sign_upload_url that will return a metadata :upload_url, however I can't make it return the metadata from mutation
Solution:
```elixir create :create do metadata :foo, :string ......
Jump to solution
4 Replies
ZachDaniel
ZachDaniel•4mo ago
The metadata has to be defined on the action
Solution
ZachDaniel
ZachDaniel•4mo ago
create :create do
metadata :foo, :string

...
end
create :create do
metadata :foo, :string

...
end
Vahagn
VahagnOP•4mo ago
It does not get returned from a graphql mutation there is no :show_metadata on graphql create oh, my bad, it does not get returned as a result, it is a metadata sorry I guess there is no way to hide some metadata for graphql mutations, only queries?
ZachDaniel
ZachDaniel•4mo ago
Not yet, although we can add it if someone needs it 😄

Did you find this page helpful?