Fork me on GitHub

Thanks @val_waeselynck! This is an excellent idea. I already named my keys and I don't have the opportunity to go back and rename them. Also, there is no single name for each key that satisfies GraphQL and my external APIs. I will keep this in mind for my next project.

Daniel Hines14:05:38

Isn’t namespace keywords to some sort of concatenated string a bijective transformation, such that you can really simply convert from one to the otehr?

Daniel Hines14:05:29

Kind of like camel case to hyphenated, etc.


It's not bijective. :a_b.c -> :a_b_c -> :a.b.c


you would have to add some unambiguous escaping mechanism to know that a character was in the original rather than the result of a transformation. Or reject certain input, also an option


I settled on :a.b/c -> a_b__c - it makes SQL happy, and it doesn't offend my sensibilities too much.


Even when converting the names is easy, I don't think it's beneficial. When you do that, you lose the ability to instantly trace the lifecycle of a piece of data across your whole system, with a basic text search.


It's OK for key names to not be Clojure-idiomatic. (Just like it's OK for your language to use parens instead of curly braces... sounds familiar? :) ).

😆 4

Actually, a key name that doesn't respect Clojure's namespacing convention signals that it's meant to travel across the system, in contrast e.g with component or algorithm configuration. This contrast adds clarity.

Daniel Hines19:05:12

That’s a good point - data “from the system” would stick out for having the odd_naming__conventions.


Hey all, the cloud docs have instructions for “First Upgrade Ever” but these instructions don’t apply if I used the instructions here and created the stacks individually, right? It looks like I can just go forward with the regular stack upgrade instructions.


if you’re already running a split stack you can go right to the regular upgrade


is there a way I can rewrite this pull query so I can get nil when the query doesn't find any results?

=> (d/pull (db/db) '[*] [:account/email "doesn't-exist"])
#:db{:id nil}


You want the default option for your pull Express


thanks @marshall. to clarify, I want this output:

=> (d/pull (db/db) '[*] [:account/email "doesn't-exist"])
It's currently returning #:db{:id nil}


also, this works for the cloud client api right?