Coder Social home page Coder Social logo

Comments (3)

jaydenseric avatar jaydenseric commented on June 5, 2024

Multipart HTTP requests definitely support ordering fields in the request; they are streamed one after another in the request body. If certain clients don't allow you to specify the order of fields, then I would consider that an issue with the client that needs to be improved. Even if we relax this graphql-upload implementation of the GraphQL multipart request spec to allow miss ordering the operations field before the map field, that won't solve your problem of the client sending the fields in an unpredictable order because it definitely matters a lot for performance if the file fields are not streamed after operations and map.

from graphql-upload.

Sczlog avatar Sczlog commented on June 5, 2024

In this scenario, seems like file is always composing in the last position. (idk why).

And I do some research and w3c form spec said

The parts are sent to the processing agent in the same order the corresponding controls appear in the document stream

So it looks like golang's stdlib didn't implement formdata correctly, try to find some other solution.

from graphql-upload.

jaydenseric avatar jaydenseric commented on June 5, 2024

Closing because graphql-upload is functioning correctly according to the GraphQL multipart request specification. Any changes to the that specification would have to happen in the spec repo first, then once there is an updated spec, server and client implementations can be updated to conform to the new spec. But I can tell right away, that the ordering of fields is not something likely to ever change in the spec.

from graphql-upload.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.