Fork me on GitHub

How are people integrating a "current user" into their apps? I haven't seen many (any?) examples out there in the wild.


@grzm: if you鈥檙e using normalized data, links are the way to go


@anmonteiro: thank you. and firchrissakes, there's even current-user on that page


Can links be used when returning data from the server as well?


i.e., in the response?


I don't want to unnecessarily transfer redundant data back to the client.


@grzm: links are supposed to be a client-only thing.


that said, you can of course update the data that they refer to whenever the server sends something back


I'm thinking of something like a todo list that's owned by a particular person.


I don't want to return all of the user information that the app might need for that person every time I fetch the todo list.


@grzm: just a question of eliding that from the query you鈥檙e sending to the server

Joe R. Smith18:08:05

@anmonteiro: thanks for the help with the union queries. They鈥檙e working with one remaining issue鈥撀爐he data is not being normalized. Using union queries doesn鈥檛 affect that, correct? (I have the mapentry [:normalize true] in my reconciler args)


@solussd: a number of things could be going on


:normalize true in the reconciler args will not normalize your data if you pass it inside an atom


if you want normalization to occur during initialization, pass your state as a map

Joe R. Smith18:08:36

@anmonteiro: the data retrieved from the remote is not being normalized when merged into the local state. My initial state is just a map


@solussd: with union queries you might need to tweak the queries that are sent to the remote


and pass the query as the second argument to the callback in your send function

Joe R. Smith19:08:39

hmm, the queries look correct, I鈥檓 sending the query to the callback as suggested, but still not normalizing . very strange

Joe R. Smith19:08:46

and the queries are retrieving data (and populating the state, denormalized)

Joe R. Smith20:08:57

@anmonteiro: even stranger , if I don鈥檛 use a union query at all and I send, as the query to the callback, the query from the app-root (which is what is used by default if you simply pass nil) it doesn鈥檛 normalize, but if I send nil it does.

Joe R. Smith20:08:15

I even added the same metadata