Fork me on GitHub
#graphql
<
2022-05-06
>
thumbnail11:05:04

We ran into an interesting issue where lacinia returns "com.walmartlabs.lacinia.schema/null" instead of nil when tagging nil with a schema-type. I suspect this is related to the return-type of this field (which is a non-nullable union), it seems like a bug; should I create an issue or am I missing something šŸ‘€ ?

hlship16:05:38

That looks like a bug to me.

thumbnail19:05:00

I can try to get a repro going if youd like

nottmey12:05:09

Hey there, building my first Clojure library, and it aims to combine Datomic and Lacinia! šŸ˜³ Still in draft and all, but happy to read your thoughts! (And also keen to get coding feedback šŸ™Š) https://github.com/nottmey/datomic-lacinia

šŸ‘ 1
steveb8n23:05:58

I like this idea and lots to learn from building it. hereā€™s an alternative that might make it easier for youā€¦

steveb8n23:05:20

if you used this lib you get the lacinia schema for free https://github.com/hodur-org/hodur-engine

steveb8n23:05:34

you also get the Datomic schema for free. this addresses the issue of inferring the ā€œentityā€ shape from the schema, the Hodur schema makes that very clear

steveb8n23:05:08

you could create a set of Lacinia resolvers to provide CRUD i.e. link the GraphQL and Datomic schemas together to produce a working web service. this can be created and tested locally using the dev-local lib from Datomic Cloud

steveb8n23:05:31

just a suggestion. either way, I like seeing what you are doing

nottmey09:05:49

Hi @U0510KXTU, indeed and I didnā€™t know about the Hodur approach. Ofc, I canā€™t replace domain modelling, so the datomic schema needs to be modelled anyway. I will think about it, maybe there is a way to differentiate the approaches. My main motivation is/was keeping datomic as source of truth and not deriving both schemas from a third source, so maybe thatā€™s simply a different way to do it. (I hope itā€™s still helpful for some people. I will probably try out both in my application stack anyway.) About CRUD, yes thatā€™s the plan, reusing transaction function etc. Thank you for the nice words and the feedback! šŸ˜Š