nikitastupin / clairvoyance

Obtain GraphQL API schema even if the introspection is disabled
Apache License 2.0
1.02k stars 92 forks source link

TypeError: 'NoneType' object is not subscriptable #35

Closed skroggur closed 1 month ago

skroggur commented 2 years ago
Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/skroggur/clairvoyance/clairvoyance/__main__.py", line 111, in <module>
    input_document = s.convert_path_to_document(s.get_path_from_root(next))
  File "/home/skroggur/clairvoyance/clairvoyance/graphql.py", line 148, in convert_path_to_document
    elif path[0] == self._schema["mutationType"]["name"]:
TypeError: 'NoneType' object is not subscriptable

What is causing this?

nikitastupin commented 2 years ago

Hey @skroggur,

My best guess is that the GraphQL endpoint you're testing is either (1) doesn't have mutations or (2) returns response in a format that Clairvoyance can't parse.

nikitastupin commented 1 year ago

Hey @skroggur! Could you check this with the latest (2.5.1) version of Clairvoyance and see whether it solved the problem? Thanks!

iCarossio commented 1 year ago

We worked in this one too and in our case it has been fixed by the latest PR we made :)

Privat33r-dev commented 1 month ago

We worked in this one too and in our case it has been fixed by the latest PR we made :)

Thanks for the fix. Due to inactivity of the issue starter and your response, I assume that the issue is fixed.

@skroggur we are currently clearing backlog and closing this issue. If you think that issue persists, please, feel free to write here or open another issue.