Skip to content

GraphQL error: Field 'stateReason' doesn't exist on type 'Issue' #11

@heckler

Description

@heckler

Not sure whether this is dependent on server configuration or what, but when trying to get a digest for a repository on a Github Enterprise 3.3 instance, I'm getting this error about stateReason (full trace below)

Editing graphql\issue_frag.graphql and removing stateReason was enough to suppress the error;

Even though stateReason is used in templates\digest.html.j2, it's absense from the issue fragment does not seem to have caused any issues with the rendering of the template.

Error log

$ python3 -m dinghy https://some_private_instance.com/some_org/some_repo
Traceback (most recent call last):
  File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/vagrant/.local/lib/python3.9/site-packages/dinghy/__main__.py", line 7, in <module>
    cli(prog_name="dinghy")
  File "/home/vagrant/.local/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/vagrant/.local/lib/python3.9/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/vagrant/.local/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/vagrant/.local/lib/python3.9/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/vagrant/.local/lib/python3.9/site-packages/dinghy/cli.py", line 53, in cli
    main_run(coro)
  File "/home/vagrant/.local/lib/python3.9/site-packages/dinghy/cli.py", line 21, in main_run
    return asyncio.run(coro)
  File "/usr/lib/python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete
    return future.result()
  File "/home/vagrant/.local/lib/python3.9/site-packages/dinghy/digest.py", line 469, in make_digest
    results = await asyncio.gather(*coros)
  File "/home/vagrant/.local/lib/python3.9/site-packages/dinghy/digest.py", line 130, in get_repo_entries
    issue_container, pr_container = await asyncio.gather(
  File "/home/vagrant/.local/lib/python3.9/site-packages/dinghy/digest.py", line 152, in get_repo_issues
    repo, issues = await self.gql.nodes(
  File "/home/vagrant/.local/lib/python3.9/site-packages/dinghy/graphql_helpers.py", line 173, in nodes
    data = await self.execute(query, variables)
  File "/home/vagrant/.local/lib/python3.9/site-packages/dinghy/graphql_helpers.py", line 160, in execute
    _raise_if_error(data)
  File "/home/vagrant/.local/lib/python3.9/site-packages/dinghy/graphql_helpers.py", line 68, in _raise_if_error
    raise Exception(msg)
Exception: GraphQL error: Field 'stateReason' doesn't exist on type 'Issue' @fragment issueData.stateReason, line 47 column 3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions