Using React suspense (0.0.0-experimental-d7382b6c4) with reason-urql I run into the following error.
Uncaught TypeError: b is not a function
d webpack://social_chat/./node_modules/wonka/dist/wonka.mjs?:142
1 webpack://social_chat/./node_modules/wonka/dist/wonka.mjs?:814
toSuspenseSource webpack://social_chat/./node_modules/urql/dist/urql.es.js?:197
1 webpack://social_chat/./node_modules/wonka/dist/wonka.mjs?:801
x webpack://social_chat/./node_modules/wonka/dist/wonka.mjs?:155
_0 webpack://social_chat/./node_modules/wonka/dist/wonka.mjs?:76
_0 webpack://social_chat/./node_modules/wonka/dist/wonka.mjs?:166
d webpack://social_chat/./node_modules/wonka/dist/wonka.mjs?:290
x webpack://social_chat/./node_modules/wonka/dist/wonka.mjs?:158
I webpack://social_chat/./node_modules/wonka/dist/wonka.mjs?:303
d webpack://social_chat/./node_modules/wonka/dist/wonka.mjs?:141
1 webpack://social_chat/./node_modules/wonka/dist/wonka.mjs?:814
_0 webpack://social_chat/./node_modules/wonka/dist/wonka.mjs?:710
d webpack://social_chat/./node_modules/wonka/dist/wonka.mjs?:142
1 webpack://social_chat/./node_modules/wonka/dist/wonka.mjs?:814
1 webpack://social_chat/./node_modules/wonka/dist/wonka.mjs?:703
1 webpack://social_chat/./node_modules/wonka/dist/wonka.mjs?:801
x webpack://social_chat/./node_modules/wonka/dist/wonka.mjs?:155
_0 webpack://social_chat/./node_modules/wonka/dist/wonka.mjs?:76
_0 webpack://social_chat/./node_modules/wonka/dist/wonka.mjs?:166
_0 webpack://social_chat/./node_modules/wonka/dist/wonka.mjs?:314
L webpack://social_chat/./node_modules/wonka/dist/wonka.mjs?:347
1 webpack://social_chat/./node_modules/wonka/dist/wonka.mjs?:947
I webpack://social_chat/./node_modules/wonka/dist/wonka.mjs?:306
1 webpack://social_chat/./node_modules/wonka/dist/wonka.mjs?:934
L webpack://social_chat/./node_modules/wonka/dist/wonka.mjs?:346
1 webpack://social_chat/./node_modules/urql/dist/urql.es.js?:113
React 3
useSource webpack://social_chat/./node_modules/urql/dist/urql.es.js?:108
useQuery webpack://social_chat/./node_modules/urql/dist/urql.es.js?:213
useQuery webpack://social_chat/./node_modules/reason-urql/src/hooks/UseQuery.bs.js?:84
Overview webpack://social_chat/./src/screens/Overview.bs.js?:57
[...]
A console.log before the useQuery hook invocation seems to indicate this happens after the rerender caused by React development mode (the network request completes but contains the following error.
{
"data": { "currentUser" :null },
"extensions" :[{
"message":"first may not be larger than 100",
"locations":[{"line":3,"column":5}],
"path" :["currentUser","conversations"]
} ]
}
This is produced by the query
module GetConversations = %graphql(`
query user_conversations($first: Int!) {
currentUser {
conversations(first: $first) {
nodes {
id
name
}
}
}
}
`)
Phil (Kitten) suggested that it could be caused by multiple instances of Wonka. I'm not sure how I'd debug that. However, I could come up with a possibility for that which I would not know how to resolve:
- Wonka is added to bsconfig.json with reason-urql, thus it gets compiled by ReScript and loaded directly as compiled ReScript dependency.
- Wonka is also loaded by
urql which is ignored by ReScript and that import will load ./dist/wonka.mjs using import.
Using React suspense (
0.0.0-experimental-d7382b6c4) with reason-urql I run into the following error.A console.log before the useQuery hook invocation seems to indicate this happens after the rerender caused by React development mode (the network request completes but contains the following error.
This is produced by the query
Phil (Kitten) suggested that it could be caused by multiple instances of Wonka. I'm not sure how I'd debug that. However, I could come up with a possibility for that which I would not know how to resolve:
urqlwhich is ignored by ReScript and that import will load./dist/wonka.mjsusing import.