zth / rescript-relay

Use Relay with ReScript.
https://rescript-relay-documentation.vercel.app/docs/getting-started
333 stars 49 forks source link

BUG: Failure to resolve useBlockingPaginationFragment (and others) #485

Open brennancaldwell opened 5 months ago

brennancaldwell commented 5 months ago

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 5 months ago

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