jaydenseric / graphql-multipart-request-spec

A spec for GraphQL multipart form requests (file uploads).
994 stars 54 forks source link

Some missing points #9

Closed mcg-web closed 6 years ago

mcg-web commented 6 years ago

Hi, We are implementing a middleway to this php lib for some backward compatibility reasons we can't use php middleway lib... but It seems specifications don't explains:

Can you please help me to get all this?

jaydenseric commented 6 years ago

Sorry for the late response, I need to stop clearing notifications right after I wake up!

how server answer in case of batch request?

This is outside the domain of this spec, but the answer is exactly the same as a regular batched request: The response will be an array of GraphQL responses.

how server deal with optional files?

Not really sure what you mean. If there are no files in the operation to upload, then send a regular POST request instead of a multipart request. If there are two optional file arguments/variables and only one is populated, the genuinely null one will not have an entry in the map field and no file field will be appended for it.

mcg-web commented 6 years ago

Thanks , that's exactly what was missing me 👍