~sourcemage/wand

18863537cf915e950fb9b5cc89800c9cff000eb9 — Vlad Glagolev 3 years ago 3eff1b1
Use parameterization in GraphQL query
1 files changed, 2 insertions(+), 1 deletions(-)

M remirror/remirror
M remirror/remirror => remirror/remirror +2 -1
@@ 346,7 346,8 @@ class ProviderSourceHut(Provider):
    def sanity_check(self, repo):
        # GraphQL
        graphql = "/query"
        repo_ok = {'query': '{{ repositoryByOwner(owner: "{0}", repo: "{1}") {{ name }} }}'.format(self.group, repo.name)}
        repo_ok = {'query': 'query GetRepo($owner: String!, $repo: String!) { repositoryByOwner(owner: $owner, repo: $repo) { name } }',
                   'variables': {'owner': self.group, 'repo': repo.name}}

        req = self.http_call(graphql, repo_ok)