mattkrick / cashay

:moneybag: Relay for the rest of us :moneybag:
MIT License
453 stars 28 forks source link

Persisted documentId #104

Open mattkrick opened 8 years ago

mattkrick commented 8 years ago

Instead of sending a query, the query string should be stored on the server and we tell it what parts we want. Since the AST is a tree and it's validated, we'll only have to validate cars, which we can do in cashay. To tell the server what parts we want, we could probably use something like what react used to do with the DOM. 1.4.2.6. Each integer holds 31 flags, true means grab that field. Since theajority of objects have <10 fields, the integers won't exceed 2^10.

mattkrick commented 8 years ago

Alternatively, I could create a combination map, where every unique combination of things gets a number. Then I look up that number. Thatd be more memory + CPU though.