-
Notifications
You must be signed in to change notification settings - Fork 18
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
Explicitly uncurry rescript-apollo-client #159
base: master
Are you sure you want to change the base?
Conversation
In general, are we ready to cut a release of the previous stuff so that we're clear for this to be merged in when ready? I have been hesitant due to the requirement of a dev build of |
Probably should have @illusionalsagacity in that last comment |
I tried out
I've been using |
We've been using I've managed to get a build published of my graphql-ppx pr to @illusionalsagacity/graphql-ppx |
@illusionalsagacity I've finally gotten some time to test this out. I've been using your published graphql-ppx fork and am still encountering an annoying uncurrying issue:
not sure if I'm missing anything... other than changing the name of the dependency in my rescript.json to your library and installing it I have made no other changes. if it's helpful, I've factored out a fragment from my GraphQL schema since I know that's been an issue for graphql-ppx in the past. |
Ahh yeah, did you try adding the |
I did try adding |
d7b27f0
to
41cfb74
Compare
Passing a function as a callback doesn't work in uncurried mode, so arguments must be explicitly defined when using Belt functions. Source: https://forum.rescript-lang.org/t/ann-uncurried-mode-in-rescript-v11/4721/11
Purpose
To allow pre-Rescript v11 projects to use this library without reconfiguring ppx flags or setting
"uncurried": false
in one'srescript.json
(previously the now deprecatedbsconfig.json
).Background
This exists as a subsequent step following an intermediate config-only solution wherein this library temporarily supports the
"uncurried": false
flag to quickly get this working with Rescript ≥ 11.Caveats
This required the installation of
@rescript/core
, a new library that deprecates the oldJs
library that shipped with Rescript originally. Though this libary is an explicit install now, it will be folded into the Rescript ecosystem and shipped out in later releases.For now, this was added to avoid a strange error wherein
Js.Dict.map
relied on a curried implementation.In contrast,
RescriptCore.Dict.mapValues
does not.This will need some testing against the EXAMPLES since it is not working correctly but I've done some preliminary testing against an external project of mine and appears to compile correctly.