How would you do file uploads in a React-Relay app?

后端 未结 5 1281
时光说笑
时光说笑 2020-12-30 03:45

A file upload seems like a mutation. It\'s often accompanied by other data. But it\'s a big binary blob, so I\'m not sure how GraphQL can deal with it. How would you inte

5条回答
  •  无人及你
    2020-12-30 03:59

    I found an explanation in the docs. You can subclass Relay.Mutation and implement the getFiles function.

    Also, express-graphql provides an example in its test cases of how to handle this on the server side.

提交回复
热议问题