Open elistone opened 5 years ago
We do have some documentation on d.o. https://www.drupal.org/docs/8/modules/graphql but not about files.
Maybe we should rewrite the Drupal way what I found (javascript) on https://medium.com/@danielbuechele/file-uploads-with-graphql-and-apollo-5502bbf3941e ? But that needs a server side code piece I guess.
Note: the new official documentation is on https://drupal-graphql.gitbook.io/graphql/ which I found through #761 ... not searched there for files.
Hello, using version 3 I have found that this worked : https://github.com/drupal-graphql/graphql-examples/blob/master/src/Plugin/GraphQL/Mutations/FileUpload.php but not using that currently so can't really testify to if this is entirely a good solution. Should be a good starting point though..
We are currently working on 4x File uploads as well. At the time we integrate it back to the module we should add some docs.
Feel free to add PR's for docs as well, it should always live inside the "doc" folder ;)
@joaogarin thanks for the pointer but his will not land in this drupal-graphql/graphq
project but stays an example?
I'm wondering if it's possible to test FileUpload mutation via /graphql/explorer and what's the structure for the file variable.
Where is the documentation for this? This is a big roadblock for those folks just getting into GraphQL and headless using Drupal.
Are there any simple instructions on how to create file upload mutations?