Fork me on GitHub
#untangled
<
2016-04-13
>
tony.kay00:04:09

Yes, data item has to have an ident because that is how load-field generates a query that the server can understand

tony.kay00:04:19

the Ident identifies the database entity being queried

tony.kay00:04:51

So, the data item has comments. The comments are what you want to load (with respect to a data item). The data item has an ident which is used by load-filed to generate query. Not sure what you mean by the rest of it.

currentoor00:04:11

Sorry my explanation is lacking, I'm wondering if load-collection is what I should be using.

currentoor00:04:10

I want to load a collection of DataItems and pass the whole collection to a table component (takes in a vector and renders a table).

currentoor00:04:26

@tony.kay: do you have a code snippet of how to use load-collection anywhere I look at?

currentoor00:04:54

I looked at it's spec but still couldn't quite figure it out.

currentoor00:04:45

specifically how to use it with lazily-loaded

tony.kay03:04:38

@currentoor: Look at the latest version of the tutorial. There is a devcard where you can see the app state changing. lazily-loaded isn’t intended for load-data (old name deprecated). The load-data call is typically used with a query to get top-level data and a post mutation get create a resulting UI view. There is a global marker for loading that you can use in “link” queries in order to display a general loading marker.

tony.kay03:04:07

So, when using load-data you’re typically putting stuff into the app state that isn’t directly visible to UI queries yet.

tony.kay03:04:06

I’ll have my talk from PDX up soon, and that may help clarify. Basically, the overall story for generalized data loading is for you to load tables in with load-data and do a post-mutation (which you can trigger from the load) to turn that into UI tree structure for the UI.

tony.kay03:04:01

well, normalized, not tree….but that’s the general idea. The UI queries regularly do NOT match what you want to say to the server.

currentoor03:04:46

Awesome, I’ll read through it now and thanks for the help.