Closed superbeeny closed 4 years ago
I'm not completely sure what you mean by "substitute"? Do you mean change its value?
Its value is provided in the variables
map above. So, you can just modify it there:
variables["querystring"] = githubv4.String(`"archived: true"`)
Also see https://github.com/shurcooL/githubv4#arguments-and-variables.
when I put it into the graphql query like
} graphql:"search(first: 100, after: $repocursor, type: REPOSITORY, query: \"pushed:>2020-04-01 created:2020-01-01..2020-02-01\")"
I get results, when I choose to use a variable $querystring
and variable in
graphql:"search(first: 100, after: $repocursor, type: REPOSITORY, query: $querystring)"
I get nothing.
Oh. It might be because you're including double quotes in the string in the latter case (but not in the former). Try:
variables["querystring"] = githubv4.String(`pushed:>2020-04-01 created:2020-01-01..2020-02-01`)
That was it thanks!
Hi,
Hopefully this is simple miss on my part.
What is the correct format/method to substitute in a querystring?
Thanks in advance