This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-01-28
Channels
- # announcements (4)
- # aws (2)
- # babashka (56)
- # beginners (43)
- # calva (70)
- # clj-kondo (25)
- # cljs-dev (29)
- # clojure (103)
- # clojure-dev (9)
- # clojure-europe (55)
- # clojure-gamedev (8)
- # clojure-nl (5)
- # clojure-norway (5)
- # clojure-uk (4)
- # clojured (1)
- # clojurescript (56)
- # copenhagen-clojurians (1)
- # core-async (2)
- # cursive (16)
- # datomic (5)
- # deps-new (18)
- # emacs (9)
- # events (3)
- # fulcro (45)
- # graphql (2)
- # gratitude (2)
- # kaocha (6)
- # lambdaisland (8)
- # lsp (72)
- # meander (41)
- # missionary (5)
- # nextjournal (52)
- # off-topic (2)
- # pathom (12)
- # pedestal (2)
- # practicalli (1)
- # re-frame (6)
- # reitit (5)
- # releases (1)
- # reveal (1)
- # specter (3)
- # sql (4)
- # tools-deps (22)
- # vim (8)
- # wasm (1)
- # xtdb (22)
Hello 👋 I'm following the pathom3 graphql tutorial, and while it works fine for the Star Wars API, when I point it to the https://docs.gitlab.com/ee/api/graphql/getting_started.html I encounter consistent browser crashes (I'm working with cljs in the browser). Looking into the code, it seems the strategy is to load the entire schema into memory in order to produce the pathom indexes, but I think the sheer size of the Gitlab schema is causing problems in a browser environment (it seems roughly 25x larger than the Star Wars example). I realize this is a very experimental feature, but I'm just curious whether this is a known bottleneck?
I had the same issue, the problem is that Gitlab API is really huge, I have plans to get back on that, the issue is probably around some inefficiencies on handling nested inputs (which the Pathom GraphQL schema loader implementation uses a lot)
the temporary (not ideal) solution is to just wrap the REST API, the parts you use (that's what I'm doing until this gets figured)
@cjsauer can you try again using latest Pathom and Pathom3 GraphQL? I just merged a significant improvement on Pathom 3 GraphQL regarding the schema process part of it, more details at: https://github.com/wilkerlucio/pathom3-graphql/pull/12
@wilkerlucio the schema loading of the gitlab API is now near instant on the latest commit! However, there may be a bug somewhere in the cljs side of things, but it could also very well be me doing something wrong. I keep running into the error below when attempting to run queries using the p.eql/process
function. Here's the query I'm trying to run:
(p/let [result (p.eql/process env
[{:swapi.Root/allPeople
[{:swapi.PeopleConnection/people
[:swapi.Person/name
{:swapi.Person/filmConnection
[{:swapi.PersonFilmsConnection/films
[:swapi.Film/title]}]}]}]}])]
(tap> result))
It's the same query from the https://pathom3.wsscode.com/docs/tutorials/graphql-integration/. And here's the error:@cjsauer can you try main again please? pushed some changes
@wilkerlucio that fixed it! It's working now for both the tutorial API and gitlab. Thank you for the quick fixes.
thanks from bringing it up, its a push for making things happen 🙂
Of course. Just noticed that the copy/paste brought in the wrong function name: https://github.com/wilkerlucio/pathom3-graphql/pull/13
@cjsauer can you try again using latest Pathom and Pathom3 GraphQL? I just merged a significant improvement on Pathom 3 GraphQL regarding the schema process part of it, more details at: https://github.com/wilkerlucio/pathom3-graphql/pull/12
@wilkerlucio the schema loading of the gitlab API is now near instant on the latest commit! However, there may be a bug somewhere in the cljs side of things, but it could also very well be me doing something wrong. I keep running into the error below when attempting to run queries using the p.eql/process
function. Here's the query I'm trying to run:
(p/let [result (p.eql/process env
[{:swapi.Root/allPeople
[{:swapi.PeopleConnection/people
[:swapi.Person/name
{:swapi.Person/filmConnection
[{:swapi.PersonFilmsConnection/films
[:swapi.Film/title]}]}]}]}])]
(tap> result))
It's the same query from the https://pathom3.wsscode.com/docs/tutorials/graphql-integration/. And here's the error: