Repository 'type': 'NOT_FOUND' graphQL API #24737
-
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):
But there is a weird problem. The error is the following (owner/name as an example):
Some things that i have tried:
Line of code that i use for the request on Python.
Does anyone had this problem aswell? Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Looks like the same issue as Graphql repository query fails to redirect in some cases |
Beta Was this translation helpful? Give feedback.
-
Hi, Meantime i managed to solve this. Not entirely sure about the science behind this. What i did to solve was the following:
And than passed it along:
|
Beta Was this translation helpful? Give feedback.
Hi,
Meantime i managed to solve this.
Not entirely sure about the science behind this.
After printing the post payload that i was sending to github (
response.requests.headers
) i found out that the requests library was dropping the headers. After some reading it seems that it’s due to a redirection of url and for security reasons it drops the headers that contains my token.What i did to solve was the following:
(This class is used to avoid using .netrc config)
And than passed it along:
response = requests.post(url=GRAPHQL_URL, json=query, headers=self._headers, auth=NullAuth())