Fork me on GitHub

N00b question. I have created an unholy alliance between fulcro-rad-demo and the React Native demo code. I have jumped through several hurdles already but my EQL and Pathom skills are in their infancy. I do not understand why the below query is causing the RAD demo parser to throw an exception:

[{:com.wsscode.pathom.connect/indexes [:com.wsscode.pathom.connect/idents :com.wsscode.pathom.connect/index-io :com.wsscode.pathom.connect/autocomplete-ignore]}]
Can anyone point me in the right direction? Thanks! P.S. This query is coming from Fulcro Inspect Electron. I am sure that my parser is incorrect in this case.


@hadilsabbagh18 When you say “the query is coming from Fulcro Inspect Electron” do you mean that you entered that query in the EQL tab and got the expected result?


No @alex-eberts. This is a query that Fulcro Inspect Electron sends to load the Pathom indexes for the EQL window.


So where are you getting that query from? The network tab?


No the load Pathom index button on the EQL tab. I think I don't have transit properly configured in my code, based on the error message:

body was either not transit or you have not installed the correct transit read/write handlers."


It’s possible that you may be using an older version of the rad demo. There was a PR in Dec that fixed an issue with the index not loading:


When did you pull the RAD-demo?


Last week.


Let me look into that though


That code in in my demo.


Is your code on a public repo that I can take a look at? Have you checked with the guys in the #pathom channel to see if this is a known problem?


The repo is not public, unfortunately.


I will keep digging.


Thanks for you help @alex-eberts.


Sorry I couldn’t be of more help - good luck!


So, my first question @hadilsabbagh18 is “does it work with the stock demo?” I have not tried in a while, but it should. If the answer to that is “yes”, then my guess is that you changed the parser in some incompatible way. If the answer is “no”, then it is an oversight in the demo. Also, did you change versions of things? What version of Pathom? Fulcro assumes Pathom 2.x

Jakub Holý (HolyJak)15:02:33

Notice the Index resolver filters out some non-transit data


I resolved my problem. Thanks everyone! I started from the RAD demo and carefully integrated the native stuff.


I’m looking for a little guidance on authorization of various parts of my app (non-RAD). I have an authentication flow and UISM similar to what RAD provides that allows for auth using AWS Cognito. I have a set of user permissions in my state. What I’m unclear on is where is the best layer in the app to enforce authorization. I have simple router hierarchy. Some things I’d like to be able achieve: 1. Have a authenticated and non-authenticated authorized routes 2. Have authorization on particular components, say comparing the user permissions to the set of permissions on the components 3. Perhaps even have authorization on the query. RAD provides a few hints of authorization against attributes but purposely avoids an implementation as it’s a minefield. At this state all front end. I’ll sort parser security at a later stage. What I’m looking for is a little guidance on which hooks in the system to use. For this kind of functionality should I be using allow-route-change? on the routes? Should I build an authorizing router that can wrap other components? Should I be using render-middleware? Should I just have a defsc or function that can do this for me? I want to keep the simplicity and performance that fulcro provides. I’m a little lost and would love a push in a particular direction, perhaps even a strong shove! Where to begin or how have others done it?


I’m thinking that I should just take the RAD approach: Have a Session component that queries on the authentication state as well as the user permissions, then just use those directly in components that require them.