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

Support of file types #19

Open
yarax opened this issue May 10, 2017 · 12 comments
Open

Support of file types #19

yarax opened this issue May 10, 2017 · 12 comments

Comments

@yarax
Copy link
Owner

yarax commented May 10, 2017

No description provided.

@machbio
Copy link

machbio commented Aug 5, 2017

@yarax - any pointers to start this enhancement ?

@yarax
Copy link
Owner Author

yarax commented Aug 5, 2017

I'm still not sure how to handle this.
Passing multipart data to GraphQL is quite tricky.
So ideas and PRs are appreciated

@KrzysztofKarol
Copy link

Maybe swagger-to-graphql should skip it (try-catch) it for now?

@kbrandwijk
Copy link
Contributor

In graphql-yoga, we use apollo-upload-server. It would be great if the generated schema would be compatible with that, for easy delegation.

@fishgills
Copy link

Is there anyway to get around this? I was all excited to find this tool (Trying to proof of concept graphQl vs Rest) but I'm getting the Error: Cannot build primitive type "file" error when doing command line.

@4F2E4A2E
Copy link
Collaborator

4F2E4A2E commented Jan 30, 2018 via email

@yarax
Copy link
Owner Author

yarax commented Jan 30, 2018

@kbrandwijk then library will be coupled with apollo stack. As far as I know there are no official suggestions from official GraphQL contributors to support file types so far

@kbrandwijk
Copy link
Contributor

@yarax I agree, it's just one possible implementation, requiring client and server to use the same library, and both are apollo. So it should definitely not be the standard approach. However, just throwing an error is also not an option. So I would say: either ignore, or provide an opt-in for the (afaik) only common GraphQL implementation for files, even though it's not part of the spec...

@0xR 0xR mentioned this issue May 25, 2019
@0xR
Copy link
Collaborator

0xR commented Sep 28, 2019

Ignoring file types is already implemented. Actually supporting file types will be tracked in this issue.

@mina-mina
Copy link

mina-mina commented Jun 29, 2020

using openapi 3.0.0

if a schema contains application/pdf i get this error:
{"errors":[{"message":"Cannot read property 'schema' of undefined"}]}

where if the schema contains: multipart/form-data
{"errors":[{"message":"Unsupported content type(s) found: multipart/form-data"}]}

@gablabelle
Copy link

gablabelle commented Mar 5, 2021

Ignoring file types is already implemented. Actually supporting file types will be tracked in this issue.

@0xR How can we ignore file types exactly? I have these errors and I'd like to bypass these errors.

@dancomanlive
Copy link

Any updates on this? I am also getting Unsupported content type(s) found: multipart/form-data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants