Anyone have good results from lacinia + datomic? Seems like it should work ok but I'm encountering pain in the butt things like graphql not allowing kebab-case and losing keyword namespaces.
This is what I wrote locksmith for https://github.com/oliyh/locksmith
I think this is a part of graphql spec to not allow dashes and slashes
right, so right now I'm planning on doing "user_id"
, "db_id"
, "user_anotherId"
to get around it
and let the frontend parse into :user/id
, :db/id
, :user/another-id
it's icky
You can use clojure.set
fxn as an easy workaround
fxn?
rename-keys
Eg:
(def ^:private kmap {:user/id :id, :user/first-name :first_name})
(defn get-user [_ args _]
(clojure.set/rename-keys (get-user (d/db db/conn)
(:id args)) kmap))
@deadghost checkout https://clj-commons.org/camel-snake-kebab/
I'm using Lacinia to build a graphQL server, I noticed that pedestal/service-map
was deprecated so I switched to pedestal2/default-service nil
but I'm noticing a tonne of WS errors, the server runs fine but this error is pretty annoying, any idea what's going on? :
ERROR com.walmartlabs.lacinia.pedestal.subscriptions - {:event :com.walmartlabs.lacinia.pedestal.subscriptions/error, :line 513}
java.io.EOFException: Disconnected
at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.disconnect(AbstractWebSocketConnection.java:323)
at org.eclipse.jetty.websocket.common.io.DisconnectCallback.failed(DisconnectCallback.java:36)
at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.close(AbstractWebSocketConnection.java:200)
at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.remoteClose(AbstractWebSocketConnection.java:279)
at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.incomingFrame(AbstractEventDriver.java:109)
at org.eclipse.jetty.websocket.common.WebSocketSession.incomingFrame(WebSocketSession.java:319)
at org.eclipse.jetty.websocket.common.extensions.AbstractExtension.nextIncomingFrame(AbstractExtension.java:147)
at org.eclipse.jetty.websocket.common.extensions.compress.PerMessageDeflateExtension.nextIncomingFrame(PerMessageDeflateExtension.java:112)
at org.eclipse.jetty.websocket.common.extensions.compress.PerMessageDeflateExtension.incomingFrame(PerMessageDeflateExtension.java:71)
at org.eclipse.jetty.websocket.common.extensions.ExtensionStack.incomingFrame(ExtensionStack.java:201)
at org.eclipse.jetty.websocket.common.Parser.notifyFrame(Parser.java:226)
at org.eclipse.jetty.websocket.common.Parser.parse(Parser.java:255)
at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.readParse(AbstractWebSocketConnection.java:581)
at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:434)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:698)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:804)
at java.base/java.lang.Thread.run(Thread.java:832)