Fork me on GitHub

Hi! I was looking at connecting graphql as a fulcro remote. It seems to load the schema now, but I cannot explore what resolvers/queries are now available, does anyone have suggestions on how to find that out?


I found a solution! Probably the rest of the world already knew this, but if you press the grey circle left of ‘Run query’ in the Fulcro Inspector Query tab, it will give you suggestions on what you can query 🙂

👍 10

@liesbeth exactly, maybe we should somehow try to make that more obvios, in the first versions it used to load it automatically, but that was a problem for people not using pathom


just not sure how, but I'm open to design ideas 🙂


Okay. If I think of anything I’ll let you know 😉


I actually also have another question: in the documentation about graphQL it says ” Name munging is customizable via Pathom settings.” How would that work? I am using a graphql endpoint that has query and mutation names capitalized, and am not sure how to change this is pathom.


@liesbeth trying to remember, I know there is a flag for that, try setting :com.wsscode.pathom.graphql/js-name (its a fn that receives a string, you can use identity for no change) in the graphql settings


humm, but looking at the sources I'm not sure if thats true for the connect integration, we may need to change some code to fix that, the js-name works on the simple integration, but it should work for connect too, just seems you are first to stumble on it


capitalized is the default in graphql, pathom converts it to kebab case to be more clojure friendly


but I can see that going wrong in some cases, did you got in one?


Where it goes wrong in my case is that there is for example a query Chat in my schema. The eql [{ []}] becomes query { chat { id } }, but I need query { Chat { id } }


I don’t think that it’s going wrong (in the sense that the code is doing something else than was your intention), but my schema conforms to another standard where the root queries and mutations are written with a capital


I’ve checked out pathom but I don’t see directly where I should make the change. Should I be looking at node->graphql?


@liesbeth thats a different problem I think, just to clarify, the GraphQL query would be something like: query { Chat(id: "...") { id name } }, is that correct?


Yes, that would be it


cool, for this case you should also take a look at ident-map thing, that's the recommened way to run those via pathom, so in pathom this would become: [{[ "..."] []}]


Thanks, got it hooked up!


because it uses a local version that doesn't allow for replacing the ::pg/js-name fn


@wilkerlucio Thanks! I’ll take a look at that 🙂


@liesbeth please let me know how that goes, I would love to help and make the support more broad, since you actually have an use case lets get it fixed, I can take a revamp at the munging part tonight, if you can please list all the cases were the current transformation is failing, so far its about capitized entry points, but I guess you may find more


@wilkerlucio This is the only problem that I’ve encountered so far, but I’ve just started this morning 😉