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

Values are not converted to their original types on server #12

Open
ochicf opened this issue Jun 27, 2018 · 0 comments
Open

Values are not converted to their original types on server #12

ochicf opened this issue Jun 27, 2018 · 0 comments
Labels
bug Something isn't working

Comments

@ochicf
Copy link
Contributor

ochicf commented Jun 27, 2018

When performing a mutation that includes a File, the graphql request is done with multipart/form-data content type header (instead of application/json). That causes all the data to be received as string, losing the original data type.

Fields at root level of a collection are properly casted back (I don't know why nor where), but it does not happen with nested fields. That causes that all data in nested fields is not being saved properly, and can trigger validation errors (of type errors.expectedType).

More investigation should be performed in order to:

  • know why and where root fields are properly casted
  • try to cast nested fields there, or decide a good place where it can be done
@ochicf ochicf added the bug Something isn't working label Jun 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant