Fork me on GitHub
#graphql
<
2018-07-26
>
curtosis15:07:16

finally got data loaded, stillsuit connected , and started migrating queries over to the real database.

curtosis15:07:40

first query I tried to resolve was an all-organizations, which works, but this { organizations { displayName } } returns { "data": { "organizations": [ "null", "null", ...]}}

curtosis15:07:57

so I think somewhere the field mapping isn’t being handled correctly?

curtosis15:07:14

:organization/displayName is the property I’m trying to show

curtosis15:07:11

or rather, the datomic property is :organization/display-name. so I think the stillsuit default resolver isn’t translating correctly.

curtosis15:07:08

aha! found it…. guess-entity-ns needs a unique attribute on the entity.

curtosis15:07:23

(which not all my entities currently do, other than :db/id…)

curtosis16:07:35

I can’t see one … is there any way to get stillsuit to accept a provided namespace for an entity?

Peter Wilkins18:07:06

can you add namespaced for your entities in datomic? - you’ll thank yourself later if you do

timgilbert21:07:32

Uh, you can tell it what the (graphql) type of any given datomic ref is: http://docs.workframe.com/stillsuit/current/manual/#__stillsuit_lacinia_type

timgilbert21:07:43

Not sure if that's what you were looking for

Peter Wilkins18:07:39

I haven’t used it myself but have you got :JavaUUID as your type in the schema then it should convert it automatically

curtosis18:07:20

hmm.. my schemas are generated by umlaut, so in the original def it’s ID….

Peter Wilkins18:07:56

I also started with umlaut - great to get started but when I needed to do something it didn’t I switched to just using a lacinia schema.

Peter Wilkins18:07:27

although I think umlaut can have custom scalars

curtosis18:07:14

I’m using a hacked-up version that lets me do some of the things it didn’t do for me. 🙂

curtosis18:07:25

I really like being able to generate the diagrams from the same source

curtosis18:07:02

but you’re right, I’m constantly asking myself if it’s time to cut over and just accept that datomic and lacinia will need to be separately managed

curtosis18:07:37

probably a better solution in production anyway — umlaut is not really geared for schema maintenance per se