graphql 2022-05-06

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 👀 ?

That looks like a bug to me.

I can try to get a repro going if youd like

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

I like this idea and lots to learn from building it. here’s an alternative that might make it easier for you…

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

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

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

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

Hi @steveb8n, 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! 😊