-
Notifications
You must be signed in to change notification settings - Fork 53
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
makeInputObject* and friends #238
Comments
Hey, good point. It should make the first letter lowercase in this situation. If that is not yet the case, PR is welcome. If a PR is not possible an test-case would be helpful! |
No, it does not lowercase the first letter currently. Also, the proposed approach, while it will mitigate the situation for a lot of use cases, it still may not work for some schema in the wild where both the uppercase and the lowercase field names pop up. Maybe prepend the field name with some standard lowercase letter like 'f' or 'v' or even a full word? Looking at your |
I am having an issue like this. |
Hi there,
In the case one cannot change the graphql schema, and the said graphql schema contains some input types with uppercase fields (while a relatively rare practice, it does not go against the specs), how do you envision one should approach the challenge? The ppx generated
makeInputObject
* functions will have labeled parameters starting with capital letters, which I do not think are proper ReasonML argument names (is there a trick to call such a function nonetheless?). I guess I could unwrap the input type and expose the field values as query parameters, but that gets old quickly. Currently, I have been using standard bs records andObj.magic
them into the proper type, however that is terrible since whatever goes on inside these records is entirely opaque to the type checker. I could extend the server schema with a custom input type that I would use to reassemble the server input type in the query while exposing the custom type in the query interface, but it somehow feels again a little too convoluted again.Any suggestion would help and I apologize if this is not the proper avenue for such a query.
The text was updated successfully, but these errors were encountered: