-
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
Blocked rescript@11 migration #467
Comments
Sure! Check this repo out: https://github.com/zth/relay/tree/rescript-relay. It's the Relay compiler fork RescriptRelay uses. It's in the Place yourself in the Adding |
Currently my project using "rescript": "v11-rc.4" and "rescript-relay": "^2.0.0" with uncurried: true. I have input type in graphQL schema: input ShippingFeePolicyMutationInput {
amount: Int!
freeShippingThreshold: Int
quantityStep: Int
type: ShippingFeePolicyType!
} The js output has Mutation.make_shippingFeePolicyMutationInput(~amount=0, ~_type=#FREE, ()) {
amount: 0,
_type: "FREE"
} |
The functions and type definition are extracted from the generated modules by rescript-relay. |
It's the same issue I've described in the description. |
@DZakh Can you check the playground link I've added? I'm wondering why this output has |
See rescript-lang/rescript#6354. |
I think the change should be highlighted more in ReScript V11 release notes. It's a breaking change people should know about. |
Ah! I confused the setting of playground it was v11-beta.4 not rc.3 😓 |
I opened an issue rescript-lang/rescript#6440, if the js output is generated by the return type of the external function, then |
Yes, but I think it'll be quite difficult to make it work. Also, if you noticed, in our case the type has a field called |
|
I've tried migrating the project at Carla to rescript@11 several times. I've fixed all the issues besides the problem with rescript-relay:
For context, we want to use
uncurried: false
since the codebase is quite big, and we want to gradually migrate to uncurried mode. Because of this, therescript-relay
V3 is not an option for us.So we need to use
rescript-relay
V2 until we completely migrate to uncurried mode. But there's another problem. It uses_
prefixes for gql fields having restricted names. In rescript@10 the_
s were removed in runtime, but after my PR 😅 I removed the fields mangling logic from rescript@11. This way,rescript-relay
V2 stopped handling private keywords in rescript@11 properly, the fields in compiled js are now prefixed with_
.Later, I've added the PR to allow using
@as
with@obj
so there's a migration path from fields mangling logic.So, now I'd like to update
rescript-relay
V2 to use@as
instead of_
for private keywords in the generated code. I've already taken a look in the source code and noticed a submodule written in Rust. If you tell me how to contribute to it, I'd like to give it a try. I really wish to start using rescript@11 in production.The text was updated successfully, but these errors were encountered: