Repository 'type': 'NOT_FOUND' graphQL API

Hi,

Recently i’ve been working with graphql API on github and i have some querys working correctly, including a mutation.

This is on Enterprise btw.

One simple query that i use is the following (owner/name as an example):

query MyQuery {
  repository(name: "name", owner: "owner") {
    id
  }
}

But there is a weird problem.
It works fine on my PC (Python Script with requests library) and a few others PC’s aswell.
But on some PC’s, and most importantly on our build machine, it says NOT_FOUND on 2 out of 33 different repository’s (always the same 2).

The error is the following (owner/name as an example):

{‘type’: ‘NOT_FOUND’, ‘path’: [‘repository’], ‘locations’: [{‘line’: 3, ‘column’: 9}], ‘message’: “Could not resolve to a Repository with the name ‘owner/name’.”}

Some things that i have tried:

  • Different tokens
  • Curl command seems to work, even on the affected PC’s.

Line of code that i use for the request on Python.

response = requests.post(url=GRAPHQL_URL, json=query, headers=self._headers)

Does anyone had this problem aswell?

Thank you.

Looks like the same issue as Graphql repository query fails to redirect in some cases