Fork me on GitHub
#graphql
<
2021-03-15
>
steveb8n23:03:13

Q: I am looking to implement a client side GQL API. this rules out Lacinia unfortunately. Looking for suggestions/ideas…

steveb8n23:03:10

I can use interop and https://github.com/graphql/graphql-js but that rules out JVM SSR which would reduce some complexity for me

steveb8n23:03:28

ideally I’d find a .cljc answer for this

steveb8n23:03:56

also considering https://github.com/wilkerlucio/pathom but it doesn’t support graphql resolvers. @U066U8JQJ any chance you plan to add this?

wilkerlucio00:03:40

@U0510KXTU not sure what you mean by graphql resolver support, Pathom has a very distinct processing engine, and expectations there needs to be different from GraphQL, so I don't see it

wilkerlucio00:03:04

there is GraphQL integration, but its a different thing, for that you need some graphql processor that already works

emccue00:03:45

If its client side and this is something people have done, i'd imagine some JS lib exists

steveb8n00:03:56

@U066U8JQJ since pathom resolvers are similar to graphql resolvers, I wondered if you had thought about supporting graphql by added a graphql->eql feature. I see you already support eql->graphql - hence the question

steveb8n00:03:41

@U3JH98J4R yes, the graphql-js lib mentioned above is an example of that

emccue00:03:16

any reason you can't use that?

steveb8n00:03:55

no reason at all. I just prefer to use a clojure lib instead of interop because it makes testing the full stack much easier

wilkerlucio00:03:34

@U0510KXTU GraphQL and EQL have the same goal of shape resolution, but Pathom resolvers are not like GraphQL resolvers, internally they are very different things (very different expectations). GraphQL is completly based (and depends on) a type system, Pathom approach is very different than that, I suggest you try Pathom for a while, and you can feel the difference yourself 🙂

wilkerlucio00:03:51

its a design choice for Pathom to not have a upfront schema, and I believe to make something that looks like GraphQL we would need one, and that's a not for Pathom

steveb8n00:03:10

thanks. I have used om.next previously and I’ve also played with pathom. I like the approach. that’s why I think it would be a great solution to my client side requirement

steveb8n00:03:11

ah, ok. that clarifies it more. that’s a shame but I can see why you prefer schema-less

steveb8n00:03:46

in theory, I could create a graphql->eql transform fn, even though the EQL layer doesn’t have a schema? I wonder if this would work?

steveb8n00:03:01

I noticed pathom mentioned here too, hence the question https://book.fulcrologic.com/#_fulcro_and_graphql

steveb8n00:03:51

I need to read more about Pathom Connect

gklijs01:03:18

https://github.com/oliyh/re-graph is a nice client, works both on the JVM, and in the browser, not necessarily with re-frame.

steveb8n02:03:22

@U26FJ5FDM thanks but I need a gql server impl to run in the client in this case. I have used re-graph but these days I use https://github.com/r0man/grafeo because I prefer it’s terse DSL

wilkerlucio03:03:27

@U0510KXTU I suggest you learn strait from Pathom 3 https://pathom3.wsscode.com/, the docs are better there, also better to understand the concepts

steveb8n03:03:54

ok. thanks for the tip. I’ll take a look

wilkerlucio03:03:05

even if you use pathom 2 (the current, which is production grade tested, pathom 3 isnt)

steveb8n03:03:34

I listened to your podcast interview. got me enthused to check it out again 🙂

🙂 3
steveb8n03:03:01

new docs look great. I like the babashka example. that’s a use-case I hadn’t thought of