Fork me on GitHub
#graphql
<
2020-09-09
>
mafcocinco19:09:51

Could someone point me to an example of using superlifter with lacinia but without pedestal? The lacinia example on the superlifter GitHub page assumes the use of pedestal.

vlaaad20:09:08

oh oh I have one!

oliy15:09:09

the lacinia namespace only has two things • an interceptor for starting a superlifter context (and companion fn for getting it back out) - you don't need these • the ->lacinia-promise fn which converts a promesa promise into lacinia promise - you will probably still want this

Lennart Buit20:09:47

Very cool, thats for sure! What makes it hard (assumption?) to add this with the edn based schema?

hlship20:09:27

Have to be able to stream out the SDL equivalent to the EDN schema, omitting some things (like the defs for the various directives, like \@key). Also, there’s a few issues with the default names Lacinia uses for types containing operations (QueryRoot or Queries vs. Query).

Lennart Buit21:09:48

btw; on the omission of the federation specific directives (like you mentioned @key), that appears to have been taken care of in the apollo gateway: https://github.com/apollographql/apollo-server/pull/4209

Lennart Buit20:09:22

Right, that makes sense. Its probably with good reason, but having the schema SDL as a value in the federation schema always struck me as a bit odd

Lennart Buit20:09:54

(I expected like a metaschema like __schema, but oh well. Nothing to do about it)

hlship00:09:03

Exactly, it seems like they could have used introspection to get all the data they need.