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

"copy as curl" does not save the file upload functionality #1600

Open
matthewvcarey1 opened this issue Jun 8, 2021 · 5 comments
Open

"copy as curl" does not save the file upload functionality #1600

matthewvcarey1 opened this issue Jun 8, 2021 · 5 comments
Labels

Comments

@matthewvcarey1
Copy link

Describe the bug
If you have a mutation that uploads file(s), successfully within Altair when you choose "copy as curl" a curl command line is generated but when you run it in curl it does not upload the files.

To Reproduce
Steps to reproduce the behavior:

  1. Create a graphql service that accepts uploads.
  2. Create an Altair client mutation, variables and upload file(s)
  3. Check that it works in Altair, and your server is getting the files.
  4. click on "Copy to Curl"
  5. Open an bash window and paste to the command line.
  6. Observe that the command line contains no references to the upload files that you have set.
  7. Run the command line and see that your server does not receive any files.
    Expected behavior
    I expect the "save as curl" command line should behave exactly as Altair does, if it knows where the files are.

Desktop (please complete the following information):

  • OS: Ubuntu hippo 21.04
  • Browser chrome Version 91.0.4472.77 (Official Build) (64-bit)
  • Platform: Chrome extension and snap
  • Version Not sure (about does not work) downloaded yesterday.

Additional context
Add any other context about the problem here.

@open-collective-bot
Copy link

Hey @matthewvcarey1 👋,

Thank you for opening an issue. We will get back to you as soon as we can.
Also, check out our Open Collective and consider backing us - every little help counts!

@welcome
Copy link

welcome bot commented Jun 8, 2021

👋🏾Thanks for opening your first issue here! Be sure to follow the issue template! ✌🏾

@matthewvcarey1
Copy link
Author

As an aside, I had a look at the packets that altair (using wireshark) is sending when it makes the successful upload of files and the form looks much more like the type of query that postman does rather than the type the playground does and that altair seems to generate on "copy to curl"

@imolorhe
Copy link
Collaborator

imolorhe commented Jul 3, 2021

Yeah @matthewvcarey1 the "Copy to cURL" doesn't support the file upload functionality. It hasn't been updated, so it will be buggy. Thanks for mentioning it.

@imolorhe imolorhe added the bug label Jul 3, 2021
@imolorhe
Copy link
Collaborator

I'll be disabling the "Copy to CURL" functionality when using file input, until it is properly updated with support for that.

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

No branches or pull requests

2 participants