Skip to content

GraphQL Custom Argument #9851

Answered by mortscode
mortscode asked this question in Q&A
Sep 19, 2021 · 2 comments · 4 replies
Discussion options

You must be logged in to vote

YOOOOO! Got this working like a dream.

Worked with @AugustMiller to figure out a solution to add the custom query (computed value) to my ElementQuery and then I was able to add the Argument to my plugin's GQL setup. Very stoked.

The ElementQuery approach:
https://gist.github.com/AugustMiller/7a0c5f87019f5d959b0d6001ba0be9b0

And then I added it to my src/gql/interfaces and src/gql/arguments files following the methods in the Extending GQL docs:

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@mortscode
Comment options

@mortscode
Comment options

@mortscode
Comment options

Comment options

You must be logged in to vote
1 reply
@andris-sevcenko
Comment options

Answer selected by brandonkelly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants