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

File Upload regression with @urql/exchange-graphcache 2.2.6 #635

Closed
BjoernRave opened this issue Mar 18, 2020 · 6 comments · Fixed by #639
Closed

File Upload regression with @urql/exchange-graphcache 2.2.6 #635

BjoernRave opened this issue Mar 18, 2020 · 6 comments · Fixed by #639

Comments

@BjoernRave
Copy link
Contributor

When installing the latest version of @urql/exchange-graphcache my file uploads to the apollo-server changed from looking like:

interface File {
  filename: string
  mimetype: string
  encoding: string
  createReadStream: () => any
}

file: Promise<File>

to:

interface File {
path: string
}

file: File

Now I cannot access createReadStream anymore and thus not pass the file to s3 to upload

@kitten
Copy link
Member

kitten commented Mar 18, 2020

Hiya👋

Do you have a CodeSandbox (without any API / server will do)
Also are you using @urql/exchange-multipart-fetch or something else for uploads?

@BjoernRave
Copy link
Contributor Author

BjoernRave commented Mar 18, 2020

@kitten I am using @urql/exchange-multipart-fetch. Will work on a codesandbox now.

Codesandbox: https://codesandbox.io/s/urqlexample-ssr-with-nextjs-eg660

@JoviDeCroock
Copy link
Collaborator

That codesandbox doesn't seem to show any issues in terms of what's being sent.
Screenshot 2020-03-18 at 16 06 49

Is there something I'm missing @BjoernRave

@BjoernRave
Copy link
Contributor Author

BjoernRave commented Mar 18, 2020

@JoviDeCroock the problem is what I receive on my server, not what get's send.
It works fine with @urql/exchange-graphcache@2.2.3, but not with @urql/exchange-graphcache@2.2.6.

urql@1.9.1 and @urql/exchange-multipart-fetch@0.1.1 work fine

@JoviDeCroock
Copy link
Collaborator

JoviDeCroock commented Mar 18, 2020

So are you saying that if you leave graphcache out with the latest urql it works or is it specific to graphcache? It's very hard for us to analyze what goes wrong since we can only see that it sends a binary in the sandbox.

When you would add graphcache 2.2.5, it works as well?

@BjoernRave
Copy link
Contributor Author

BjoernRave commented Mar 18, 2020

@JoviDeCroock ah, seems like you found the problem.

Thanks alot for that :)

And yes it works fine with @urql/exchange-graphcache@2.2.5

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

Successfully merging a pull request may close this issue.

3 participants