Open raelBernardino opened 1 year ago
I'd like some confirmation from any contributors to recoil-relay to confirm that this is a valid fix/patch to the issue.
Alternatively I left the node_modules alone and passed in the query field for the graphQLSelector like this:
Actually, someone else has this issue with this fix: https://github.com/facebookexperimental/Recoil/issues/1998#issuecomment-1275625029
So, might be related to how default exports are being built.
Still, this seems like a common issue, so might be reasonable for a workaround that optionally checks for default as a fallback....
I tried utilizing Recoil's recoil-relay to be able to link Recoil atoms/selectors to Relay's store. Upon following Recoil's recoil-relay steps for doing so (click here), I was receiving this error:
Upon further investigation, it seems that graphQLSelectorFamily function in the recoil-relay module wasn't properly extracting the field "operationKind" correctly. Original:
When I console logged the query parameter being passed into this function, it revealed that params.operationKind is a child of "default". This is what it should look like according to the console.log => query.default.params.operationKind. But that's not how it's being called in the recoil-relay package (query.params.operationKind).
Fix:
My log of query: