zth/rescript-relay

BUG: Failure to resolve useBlockingPaginationFragment (and others)

Closed this issue · 1 comments

BUG:
Attempt to build a rescript-relay project using Parcel results in the following error:

@parcel/core: Failed to resolve 
'react-relay/lib/relay-hooks/useBlockingPaginationFragment' from 
'./node_modules/rescript-relay/src/RescriptRelay_Fragment.bs.js'

CAUSE:
As of react-relay v16.2.0, a handful of hooks have been moved into a legacy folder in preparation for "the full rollout of the new hooks implementation" (see commit here), including FragmentResource.js, useBlockingPaginationFragment.js, useFragmentNode.js, and useRefetchableFragmentNode.js. As such, rescript-relay's attempt to import fails.

DEPS:

"react-relay": "^16.2.0",
"relay-runtime": "^16.2.0",
"rescript": "^11.0",
"rescript-relay": "3.0.0-rc.3",
zth commented

Thank you! Workaround for now: Stay on Relay 16.