This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-02-22
Channels
- # announcements (88)
- # autochrome-github (2)
- # babashka (26)
- # beginners (5)
- # biff (2)
- # cider (73)
- # clj-kondo (4)
- # cljsrn (6)
- # clojure (54)
- # clojure-art (3)
- # clojure-europe (73)
- # clojure-germany (5)
- # clojure-new-zealand (1)
- # clojure-nl (13)
- # clojure-norway (16)
- # clojure-uk (8)
- # clojurescript (73)
- # conjure (1)
- # core-async (10)
- # cursive (17)
- # datahike (51)
- # datalevin (21)
- # datomic (4)
- # emacs (2)
- # events (3)
- # fulcro (35)
- # honeysql (6)
- # introduce-yourself (1)
- # jackdaw (3)
- # jobs (1)
- # leiningen (4)
- # lsp (3)
- # malli (17)
- # off-topic (60)
- # other-languages (5)
- # pathom (17)
- # pedestal (3)
- # polylith (19)
- # portal (2)
- # practicalli (1)
- # rdf (14)
- # reitit (3)
- # releases (1)
- # reveal (9)
- # sci (1)
- # shadow-cljs (26)
- # spacemacs (17)
- # sql (4)
- # testing (10)
- # tools-build (6)
- # tools-deps (16)
- # vim (9)
How do I provide a GraphQL argument like this one?
issues(states: OPEN) {
totalCount
}
[IssueState!].OPEN
An issue that is still open
It should be:
{(:issues {:states "OPEN"})
[:totalCount]}
But yes. The pathom3 docs doesn't show GraphQL parameters.Hm… Or is "OPEN" some sort of Enum Value… In this case… I don't know.
Maybe as a keyword? :OPEN
Tried both of those and it complains that the filter argument isn't an IssueState!
.
"clojure.lang.ExceptionInfo: Resolver github/organization-ident-entry-resolver exception at path []: GraphQL Error: Argument 'states' on Field 'issues' has an invalid value (\"OPEN\"). Expected type '[IssueState!]'. at path [\"query\" \"organization\" \"repositories\" \"edges\" \"node\" \"issues\" \"states\"] #:com.wsscode.pathom3.path{:path []}"
It looks like it encodes both "OPEN"
and :OPEN
as "OPEN"
in the request it sends anyhow."IssueState.OPEN"
?
:IssueState/OPEN
?
The IssueConnection
can take a few different arguments. Among them:
states: [IssueState!]
A list of states to filter the issues by.
labels: [String!]
A list of label names to filter the pull requests by.
So there's a difference in arg type and it looks like our guesses for the notation are not correct.Pathom Viz didn't really offer any hints on this point either, and IssueState
wasn't discoverable in the Explorer.
Hm... The https://github.com/wilkerlucio/pathom3-graphql/blob/main/src/main/com/wsscode/pathom3/graphql.cljc#L28doesn't even query for enum values. Maybe there is simply no enum support in Pathom yet? @U066U8JQJ should know. 🙂
I think that's likely it. This stuff is fairly new so I'm just flagging any issues I run into 🙂 don't mind me!
But even if it doesn't query for the enum values... Pathom should know the IssueState
type..
in the enum case you should use a symbol