Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📑 documentation request: file uploads with schema stitching #4164

Closed
maxlever opened this issue May 26, 2020 · 3 comments
Closed

📑 documentation request: file uploads with schema stitching #4164

maxlever opened this issue May 26, 2020 · 3 comments

Comments

@maxlever
Copy link

maxlever commented May 26, 2020

This page on file uploads, which corresponds to this file, indicates that file uploads don't work with schema stitching. However, the linked issue was resolved in version 5 of graphql-tools.

Can the documentation be updated to (a) confirm that graphql file uploads are working and (b) show the correct procedure to get file uploads to work with schema stitching? Thanks!

@maxlever maxlever changed the title 📑Documentation update request: file upload 📑 docs update request: file upload May 26, 2020
@maxlever maxlever changed the title 📑 docs update request: file upload 📑 documentation request: file uploads with schema stitching May 26, 2020
@iMitaka
Copy link

iMitaka commented Nov 18, 2020

Is there any progress with documentation updates about this topic how to upload a file when from schema stitching gateway ?

@yaacovCR
Copy link

Apollo afaik supports graphql-tools v4 only. Later versions are maintained separately, with documentation unfortunately in some respects lagging functionality.

See a working example here: https://github.com/ardatan/graphql-tools/blob/master/packages/links/tests/upload.test.ts

Consider opening a pull request to help fill out discussion if you have time.

Note also that it may not be so advisable to simple proxy files to the subschema. You may wish to instead upload files to storage directly from gateway and send links to those endpoints to the downstream services.

@glasser
Copy link
Member

glasser commented Oct 18, 2022

Integration with a fork of an old version of graphql-upload was removed from Apollo Server last year in AS3.

We maintained some examples of how to use graphql-upload as part of the AS3 docs but have removed them in AS4; the graphql-upload docs would be the best place to look if you want to learn more about that package. (Apollo does not recommend the use of graphql-upload as doing uploads as we do not think it is best practices to do an upload as part of a GraphQL operation, and the protocol used by graphql-upload has serious security concerns unless mitigated.)

@glasser glasser closed this as completed Oct 18, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants