-
-
Notifications
You must be signed in to change notification settings - Fork 155
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
Client is sending null in the query #59
Comments
Are you using the latest versions of |
@jaydenseric Is it possible to specify the value that will replace files instead of |
I'm on the same boat with this, I can even accept a 'true', '1', etc, or the actual file names instead null |
I'm not sure what you guys are explaining, because |
I am not using apolo-upload-server, just the client and my implementation is standard graphql that rejects queries with fields set to null :) |
@crirus You need a server implementation for the GraphQL multipart request spec running before your GraphQL server or nothing will work properly. |
@jaydenseric I know, we already handle your operations and maps POST keys, but inside the input query, all fields about files are set to null, hence the query is invalidated before we get control of execution in resolvers. We could convert that input query to change the nulls, but it could be more elegant if your client send some acceptable, useful values instead. From my point of view, you could put there an array with file names Regards |
@FahdW We can reopen this if you decide to answer my earlier question about what versions you are using and clarify the problem. I can't understand what your issue with @crirus It seems you are trying to build a custom server implementation of the spec and are finding it challenging. The right place to discuss that is the |
it's not a custom built, it's using facebook graphql protocol. Simply, if yous end a field with null, it's not accepted. Even 0 is fine. |
@crirus see jaydenseric/graphql-multipart-request-spec#4 (comment). I think you are confused about how this ecosystem fits together. |
I am not, neither you are: basically you use null, graphql is not accepting it. I don't know why is a problem (if is a problem) to put anything there but null. :) |
Your GraphQL server should never receive a null value, because you should have middleware that decodes the multipart request according to the spec, and creates the standard input the GraphQL server expects to consume later in the middleware chain. I'm guessing that because you have not setup |
I know, exactly this is happening, we have a middleware to deal with this special POST format, we also replace those nulls, but we could avoid looping through all the queries, if client would send something else. |
@jaydenseric you can close this issue I managed to fix my issue. |
My query payload which contains the file portion of the mutation is now sending null when i send the payload to my backend.
The text was updated successfully, but these errors were encountered: