Fork me on GitHub
#graphql
<
2017-10-25
>
rickmoynihan10:10:21

@hlship: Does lacinia-pedestal support configuring CORS out of the box? It seems it doesn’t set the Access-Control-Allow-Origin header / OPTIONS request by default.

guy13:10:25

Hey sorry for the noob question, How do you use graphiql with lacina?

rickmoynihan09:10:19

Use lacinia-pedestal. It ships with graphiql out of the box.

guy13:10:22

Do i just need to set up graphiql and give it my URL for graphql?

guy13:10:28

Sorry if this is the wrong place to ask

timgilbert14:10:30

Say, anyone using lacinia with a datomic back-end? It seems doable but I'm not sure what the best way to handle namespaced keys is

eoliphant14:10:25

I’m using both, pretty awesome together. I just have some functions that handle the namespacing/de-namespacing

timgilbert14:10:59

Are you trying to preserve the namespaces, like :user/name -> "user.name" or something?

timgilbert14:10:05

I have a few keys like :project.domain/thing.category that seem a little tricky to deal with

eoliphant14:10:06

Yeah in this case, i’m building the Datomic db and the GQL stuff together so I kind of just follow a pattern of User.name <-> :user/name

eoliphant14:10:51

Yeah i’m looking at something more generic to handle cases like yours

eoliphant14:10:08

where the datomic db isn’t necessarily built ‘with’ the GQL api

timgilbert14:10:10

Cool, glad to hear it's workable

timgilbert14:10:00

Is there one central place where you can hook into the conversion, or are you just wrapping input/output to the API?

eoliphant14:10:12

funny you said that lol

eoliphant14:10:23

right now, I’m just wrapping

eoliphant14:10:01

but yeah I was looking at a more generic mapper/converter in the long run

timgilbert14:10:22

Ok, sweet. Thanks for the info, I'll play around with it some

eoliphant14:10:52

I’d started with something like this

{:common-object-fields {:entity/gid       "gid"
                        :entity/active    "active"
                        :entity/legacy_id "legacyId"}
 :objects              {
                        :Person  {:description "A  Person"
                                  :fields      {:person/* :map-name}}
                        :Program {}}}

eoliphant14:10:04

but haven’t played with it much more, but the thinking was that say if all the Person fields mapped 1-1 then that wild card would work, but you could also do one offs, etcv

hlship16:10:01

I'm in a stand up meeting; I'll check back on this in a bit.

domkm16:10:10

:thumbsup:

domkm17:10:02

Ah, I think it's because I didn't include attachments. Interesting to see a spec error instead of an arity error.

domkm17:10:52

It'd be nice to be able to parse a schema IDL without specifying the attachments first so that the parsed schema could be used to programmatically build the attachments.

hlship18:10:25

We went back and forth on that.

hlship18:10:09

I can't remember the reasoning.

hlship20:10:30

I actually prefer the way resolvers and documentation are provided in the new API over the various attach functions in the utils namespace.

hlship20:10:04

There's a couple of things left in Lacinia that maybe should have been straightened out before the public release. Nothing major.