graphql-kotlin icon indicating copy to clipboard operation
graphql-kotlin copied to clipboard

Provide an example of Apollo file upload

Open andrashatvani opened this issue 4 years ago • 3 comments

Currently there's no example demonstrating the implementation of a file upload. Desired would be one example with both, single and multiple files.

andrashatvani avatar Feb 08 '21 11:02 andrashatvani

Apollo file uploads are not part of the GraphQL specification and are not supported "out-of-the-box". As per #518 you will have to configure Jackson object mapper to correctly handle those types (and potentially also configure custom data fetcher to apply the custom logic - if needed).

There are some examples linked in other related issues https://github.com/ExpediaGroup/graphql-kotlin/issues/661#issuecomment-616560182 and https://github.com/ExpediaGroup/graphql-kotlin/issues/518#issuecomment-617022276

dariuszkuc avatar Feb 08 '21 15:02 dariuszkuc

@dariuszkuc Should we add a section to the docs mentioning Apollo file uploads and that they are not supported by default, just to clarify this for further issues?

smyrick avatar Feb 08 '21 18:02 smyrick

Or should we leave that to the new discussion: https://github.com/ExpediaGroup/graphql-kotlin/discussions/1037

smyrick avatar Feb 08 '21 18:02 smyrick