Fork me on GitHub
#pathom
<
2022-04-20
>
Joe R. Smith14:04:01

Good morning Pathomites: I'm getting: java.lang.RuntimeException: No such var: pcp/compute-dynamic-resolver-nested-requirements with pathom3-datomic rev fec7c00384ce6b472c196e51661e0e3a6048d314 originating here: https://github.com/wilkerlucio/pathom3-datomic/blob/bad83ee5a5973a259b2afad766fc043ab91e6b99/src/main/com/wsscode/pathom3/connect/datomic.clj#L158 That function doesn't appear to exist in Pathom3.

wilkerlucio14:04:59

hello, what Pathom 3 version are you using?

Joe R. Smith14:04:53

I'm using the transitive dependency from that version of pathom-datomic,

Joe R. Smith14:04:08

(looking it up now)

wilkerlucio14:04:33

try using all the latest

wilkerlucio14:04:41

Pathom just released, and bad83ee5a5973a259b2afad766fc043ab91e6b99 for pathom3-datomic

👍 1
Joe R. Smith14:04:57

same error with:

com.wsscode/pathom3        {:git/url ""
                                         :sha "d52e431223c3dde193ab07a7bd4dda6c2a24edf7"}

             com.wsscode/pathom3-datomic {:git/url ""
                                          :sha     "bad83ee5a5973a259b2afad766fc043ab91e6b99"}

wilkerlucio14:04:32

Pathom 3 has a maven version, you can use 2022.04.20-alpha

wilkerlucio14:04:49

but still, maybe its a legit bug, let me look closer

wilkerlucio15:04:57

@U087E7EJW can you try pathom3-datomic 9dfa5838b8ae9b5a7caa5d3a4d2eae5bdadc6373 please?

wilkerlucio15:04:51

(just pushed a fix on it)

Joe R. Smith15:04:13

that fixed it!

wilkerlucio15:04:26

thanks for reporting 🙏

👍 1
Björn Ebbinghaus15:04:51

Have you considered dropping the -alpha suffix? Every time someone asks if it is safe to migrate to v3 the answers are: "Everything from v2 is working in v3" "We use v3 in production for the last x month, without issue"

wilkerlucio15:04:22

yeah man, from time to time I think about it, my lack of confidence at this stage is more around dynamic resolvers, there still some rough edges there, but maybe that can be addressed with more specific indications

nivekuil18:04:48

what are people testing dynamic resolvers for right now? I'd like to help but can't think of a use case and I think I use pathom pretty extensively

nivekuil18:04:08

but you could always mark it as stable with some features in alpha

wilkerlucio18:04:49

dynamic resolvers are now used for GraphQL integration, but most important for me is to integrate Pathom with other Pathom instances, enabling a distributed processing architecture

nivekuil18:04:10

yeah, it's a really cool idea but what problem do you see it solving today

nivekuil18:04:25

typically those would be exposed as graphql APIs anyway right

wilkerlucio18:04:30

one simple and interesting way I think to try it is to design the system to have 2 Pathom, one in the server, one in the client, this allows you to delegate some processing parts to the client

nivekuil18:04:07

ah right, forgot I was meaning to use that to build a caching layer for fulcro

wilkerlucio18:04:11

pushing further, a 3 pathom instances could go: Web <-> Web Worker <-> Server, this allows for choosing that specific portions should be computed at the web worker to dont freese the UI

❤️ 1
nivekuil18:04:37

a little worried about bundle size/initial js load time with that

wilkerlucio18:04:15

and the most interesting for me is when dealing with micro-services, making each service provide its own graph, so you could plug in multiple graphs at once, while allow teams to develop them independently

❤️ 1
wilkerlucio18:04:46

why the worry on size / initial load? the webworker is an extra load that can go in parallel with the main page

nivekuil18:04:17

I haven't thought about web workers actually, it is interesting. currently I am not using pathom in the client at all and I know pathom has a bit of cold overhead

Ben Grabow21:04:30

Is it possible to shim the experimental features out of the main repo in a way that can be easily reintegrated once those experimental features are more stable? The core shouldn't have to appear unstable just because of some optional features still under observation. Reitit is a good example of a lib that does this subdivision thing well: https://github.com/metosin/reitit/tree/master/modules

wilkerlucio13:04:28

not in this case @UANMXF34G, because the dynamic resolvers are a core part of the processing and have tight integration with the rest (I can't split the dynamic parts, its a facet of the process)

👍 1
norman17:04:02

I would feel much more comfortable in upgrading my pathom2 app to pathom3 if it weren't alpha.

Joe R. Smith22:04:50

Using pathom3-datomic– I've got it all wired up and indexes are populated in pathom-viz, but getting errors in join queries like this: :user/date-registered is, indeed, an attribute, and it shows up in the indexes.

wilkerlucio05:04:41

this looks like a missing setup of ident attributes, can you give an example of what this query would look like in GraphQL? this way we can figure how to make the ident attributes settings

wilkerlucio13:04:53

ah, sorry, I confused graphql with datomic, there are not ident attributes on datomic, can you make a repro caso of what you are experiencing?

Joe R. Smith23:05:01

^ @wilkerlucio this is our repro using Datomic dev-local (client-api)

wilkerlucio23:05:06

thanks for the repro, hope to look at it soon, just been a busy week :)

👍 2
wilkerlucio01:05:55

hello, I just had a look in the repro, but I notice the changed example is starting from an empty database, the original tests connect to the mbrainz database (per this line: https://github.com/secos/pathom3-datomic/commit/0c4dafb5e47046b9450075b1e73357ced4cecbec#diff-682efd186f370fa01384ae9ce43d3091d9cf2c63d71d9e2ddb25b020c7155e78L15), so without connecting to the mbrainz its expected that all the tests fail, because they assume we will have the mbrainz schema/data there for testing

Matt Secoske13:05:51

My apologies for missing that! I’ll get it sorted.

👍 1
Matt Secoske22:05:58

Hi @wilkerlucio, finally got back into this. I’ve ACTUALLY reproduced it now, and (somewhat) simplified the test case… one does need to set up dev-local and the datomic-samples data before the test will run. https://github.com/secos/pathom3-datomic/commit/534d9ef29c96e8deb917a6adb369fa747780ba0c

🎉 1
wilkerlucio11:05:08

awesome, thanks, gonna check it out

👍 1
wilkerlucio02:05:11

@U03B7KALC3Y sorry the long time on this one, I merged this commit to main and it should fix the ident lookup: https://github.com/wilkerlucio/pathom3-datomic/pull/3/commits/8104c727f79f1ad52d2a9b8aaeac350f5e7c8bd0

wilkerlucio02:05:31

this made your test case pass, please let me know if you still have issues

Matt Secoske13:05:18

Thank you @wilkerlucio. Will take a look!

Matt Secoske16:05:36

That worked @wilkerlucio - thank you so much!

🎉 1
Matt Secoske22:05:58

Hi @wilkerlucio, finally got back into this. I’ve ACTUALLY reproduced it now, and (somewhat) simplified the test case… one does need to set up dev-local and the datomic-samples data before the test will run. https://github.com/secos/pathom3-datomic/commit/534d9ef29c96e8deb917a6adb369fa747780ba0c

🎉 1