Closed lgrapenthin closed 3 years ago
Hello, this is a complete list of all the namespaces you might use, but usually, you only need a few of them. The problem with an API namespace is that it will end up requiring many things you don't need, adding to start time. This was a problem in Pathom 2 and that's the reason to get things separate in Pathom 3.
In reality, you can do a lot with just 3 of those:
; this one to create resolvers and mutations
[com.wsscode.pathom3.connect.operation :as pco]
; this one is to register resolvers, creating the indexes
[com.wsscode.pathom3.connect.indexes :as pci]
; then to setup EQL processor you will use:
[com.wsscode.pathom3.interface.eql :as p.eql]
; OR, in case you use async, gonna be this instead:
[com.wsscode.pathom3.interface.async.eql :as p.a.eql]
These will cover most of the standard Pathom operations, in projects that are more than demos, usually, you gonna use pco
in a lot of places to define resolvers, while the indexes and operation you will have in a single place to start the register and set up the EQL processor.
You are welcome to set up your own API namespace as well if you like to concentrate the things in a single namespace. So I don't consider this an issue at the library level.
Maybe some spec style "dynaload" would help with the start time. Alternating between unfamiliar namespaces while learning a new library is annoying and adds unnecessary overhead. I'll be waiting for a better experience.
I'd like to learn more about this project. However I can't continue, because the documentation says:
This problem could be solved by an API namespace.