Skip to content

gh issue view fails with GraphQL deprecation warning for Projects (classic) #11992

Closed

Description

@bukzor

Description

gh issue view fails with a GraphQL deprecation warning when querying issues that have project cards.

Steps to reproduce

gh issue view --repo anthropics/claude-code 10115

Error message

GraphQL: Projects (classic) is being deprecated in favor of the new Projects experience, see: https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/. (repository.issue.projectCards)

Expected behavior

The command should complete without deprecation warnings, or handle them gracefully.

Additional context

  • gh issue create works without this warning, suggesting inconsistent GraphQL query implementations
  • The deprecated field is repository.issue.projectCards
  • GitHub deprecated Projects (classic) in May 2024
  • The command should use the new Projects API instead

Activity

  1. added
    needs-triage
    on Oct 22, 2025
  2. babakks commented on Oct 22, 2025

    @babakks
    Member

    Thanks for opening up the issue, @bukzor! 🙏

    May ask what version of gh are you using? Please run gh version.

  3. added
    gh-issue
    more-info-needed
    on Oct 22, 2025
  4. theojessop commented on Oct 22, 2025

    @theojessop

    I have encountered a similar issue with viewing PRs:

    ~/src/infra $ gh pr view
    GraphQL: Projects (classic) is being deprecated in favor of the new Projects experience, see: https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/. (repository.pullRequests.nodes.0.projectCards)
    

    Version:

    ~/src/infra $ gh version
    gh version 2.45.0 (2025-07-18 Ubuntu 2.45.0-1ubuntu0.3)
    https://github.com/cli/cli/releases/tag/v2.45.0
    
  5. BagToad commented on Oct 22, 2025

    @BagToad
    Member

    Hey @theojessop 👋 thank you for the additional report 🙏 Could you try upgrading to the latest version please? That version doesn't support the new APIs.

  6. beegan commented on Oct 23, 2025

    @beegan

    I had been seeing a similar issue with PR edits. Just upgraded, and that seems to have resolved:

    gh pr edit 441917 --body "## Summary
          Migrates …"
      ⎿  Error: GraphQL: Projects (classic) is being deprecated in favor of the new Projects experience, see: https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/. (repository.pullRequest.projectCards) 
    
  7. pookmish commented on Oct 23, 2025

    @pookmish

    Using Linux, I was also on 2.45.0. Running the sudo apt install gh did not perform the upgrade as per the instructions. I had to reinstall the keyring by using the initial install command.

    I hope that helps anyone.

  8. babakks commented on Oct 23, 2025

    @babakks
    Member

    Using Linux, I was also on 2.45.0. Running the sudo apt install gh did not perform the upgrade as per the instructions. I had to reinstall the keyring by using the initial install command.

    Thanks for the tip, @pookmish. That's right. The official Debian/Ubuntu repository is not in sync with our official repo. Users are encouraged to follow our Debian/Ubuntu installation docs.

  9. harveysanders commented on Oct 23, 2025

    @harveysanders
    Contributor

    I had the same issue on OSX in v2.63.0, but latest, v2.82.1 is good 🥳

  10. lmmx commented on Oct 24, 2025

    @lmmx

    Using Linux, I was also on 2.45.0. Running the sudo apt install gh did not perform the upgrade as per the instructions. I had to reinstall the keyring by using the initial install command.

    Thanks for the tip, @pookmish. That's right. The official Debian/Ubuntu repository is not in sync with our official repo. Users are encouraged to follow our Debian/Ubuntu installation docs.

    I think you may need to ship this latest version to apt, surprised to find I cannot upgrade my package and yet a breaking change was performed that breaks all my PR/issue workflows 😥

    Just saw the above comment, now working again on 2.82!

  11. BagToad commented on Oct 24, 2025

    @BagToad
    Member

    Leaving this issue open for a bit since it still seems helpful for people that are finding it 👍

  12. theojessop commented on Oct 28, 2025

    @theojessop

    I can confirm that updating to 2.82 fixed the issue for me 👍

  13. vnicolici commented on Oct 30, 2025

    @vnicolici

    Maybe the change that broke version 2.45.0 should be reverted? Many people will install the latest version from the Ubuntu repo and encounter this problem.

  14. harveysanders commented on Oct 30, 2025

    @harveysanders
    Contributor

    @vnicolici I believe it's an upstream change from GitHub API, not the gh CLI tool itself

  15. 7 remaining items

  16. autra commented on Nov 22, 2025

    @autra

    Additionally, our team is too small to ask maintainers to take on active maintainer roles to manage outside packages that we don't officially own.

    Of course. That's not what I asked for.

    I ask for your trust that the GitHub CLI team have done as much in our power while understanding that every community has unique needs.

    Here I'm speaking precisely about a common need: less breakage so that all distros can have a working gh cli for more than 6 months. I understand that it might not be in the hand of the gh cli team (maybe it's just the github api that should be more stable), but that's not something I can evaluate from my position.

    I understand that you do your best of course, but maybe resource allocation at github could take that into account? Thanks for all the work anyway!

  17. mohssineAboutaj commented on Nov 22, 2025

    @mohssineAboutaj

    i was having the same issue, and i fix it by Unistalling then Installing it again following the steps here

  18. babakks commented on Nov 24, 2025

    @babakks
    Member

    Thanks for your feedback, @jamak and @mohssineAboutaj! 🫶

    I couldn't reproduce the issue with APT policy. I tried containers, Multipass/QEMU VMs, and desktop VMs, while installing gh as of our docs (both as a new install and upgrade from an already installed gh from Debian repo).

    Since this is a different problem from the OP's, can you please provide us with repro steps and open up a separate issue for it?

  19. bukzor commented on Dec 4, 2025

    @bukzor
    Author

    Fixed for me on gh 2.83.1. Thanks!

  20. removed
    more-info-needed
    needs-triage
    on Dec 4, 2025
  21. jsanz commented on Feb 25, 2026

    @jsanz

    Had this issue with a new Ubuntu 24 LTS install, where following the official instructions did not install the latest version.

    sudo apt policy gh                                  
    gh:
      Installed: 2.45.0-1ubuntu0.3+esm2
      Candidate: 2.45.0-1ubuntu0.3+esm2
      Version table:
         2.87.3 500
            500 https://cli.github.com/packages stable/main amd64 Packages
     *** 2.45.0-1ubuntu0.3+esm2 510
            510 https://esm.ubuntu.com/apps/ubuntu noble-apps-security/main amd64 Packages
            100 /var/lib/dpkg/status
         2.45.0-1ubuntu0.3 500
            500 http://es.archive.ubuntu.com/ubuntu noble-updates/universe amd64 Packages
            500 http://security.ubuntu.com/ubuntu noble-security/universe amd64 Packages
         2.45.0-1build1 500
            500 http://es.archive.ubuntu.com/ubuntu noble/universe amd64 Packages

    Had to do the following steps (in case anyone gets here) to force apt to install the latest version:

    Create a file that increases the priority of cli.github.com:

    sudo bash -c 'cat <<EOF > /etc/apt/preferences.d/gh-official
    Package: gh
    Pin: origin cli.github.com
    Pin-Priority: 1001
    EOF'

    Install the package and confirm version:

    sudo apt update && sudo apt install gh && gh --version 
    gh version 2.87.3 (2026-02-23)
    https://github.com/cli/cli/releases/tag/v2.87.3
    
  22. fabd commented on Apr 11, 2026

    @fabd

    i was having the same issue, and i fix it by Unistalling then Installing it again following the steps here

    This worked. Ubuntu LTS24.04. gh version 2.55 => 2.89.0

    I had to copy/paste to terminal the Install script line by line, pasting the whole block didn't work (bash syntax error).

  23. vnicolici commented on Apr 11, 2026

    @vnicolici

    i was having the same issue, and i fix it by Unistalling then Installing it again following the steps here

    This worked. Ubuntu LTS24.04. gh version 2.55 => 2.89.0

    I had to copy/paste to terminal the Install script line by line, pasting the whole block didn't work (bash syntax error).

    I just installed gh on a new system a couple of hours ago, using the same steps, and I still experienced the same issue.

    Ubuntu 24.04.4 LTS. The gh version that was installed was 2.45.0. The command line used to install it:

    (type -p wget >/dev/null || (sudo apt update && sudo apt install wget -y)) \
            && sudo mkdir -p -m 755 /etc/apt/keyrings \
            && out=$(mktemp) && wget -nv -O$out https://cli.github.com/packages/githubcli-archive-keyring.gpg \
            && cat $out | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \
            && sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
            && sudo mkdir -p -m 755 /etc/apt/sources.list.d \
            && echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
            && sudo apt update \
            && sudo apt install gh -y
    
  24. vnicolici commented on Apr 11, 2026

    @vnicolici

    I asked Claude to look into it and it found the problem, a source priority issue. This is still a huge mess in my opinion, wasting a lot of people's time for no reason. It's the second time it bites me, through no fault of mine. At the very least, that documentation page should be updated to include an installation procedure that actually works reliably.

    Claude's opinion about this, when asked the following question:

    ❯ But, shouldn't the docs include instructions to change the priority? The procedure they provide works, but installs the wrong version.

    ● Yes, I agree with you — by outcome, the docs are wrong for anyone on Ubuntu Pro. "Follow these steps, get gh 2.45 from a different repo than the one you just added" is a genuine user-experience failure, and "well actually it's upstream Ubuntu's fault" is not a satisfying answer when the promise of the page is
    "here's how to install the current GitHub CLI on Debian/Ubuntu."

    Let me separate the two things going on, because they pull in different directions:

    The mechanism is Canonical's, not GitHub's. Ubuntu Pro ESM assigns priority 510 to its packages specifically so that security patches win over arbitrary third-party repos that users add — that's a deliberate defence against users accidentally pulling in an unpatched version from a PPA or a third-party mirror.
    From Canonical's perspective, their 510-pin is doing its job. The cli/cli docs team can't change that behaviour; it's a property of every Ubuntu Pro system everywhere. Any third-party apt repo for any package also in Ubuntu main/universe has the same problem whenever that package is tracked by ESM, and gh is far
    from the only one.

    But the outcome is still broken, and the cli/cli docs could and should say something about it. The minimum fix would be a small admonition in the Debian/Ubuntu section along the lines of:

    ▎ Note: On systems with Ubuntu Pro / ESM enabled, the ESM repo has a higher apt pin priority than the GitHub CLI repo, so apt install gh may install the ESM-backported version (which is the upstream version Ubuntu shipped at the time of the release, with security patches backported but no feature updates). To
    ▎ force the cli.github.com version, create /etc/apt/preferences.d/github-cli with Package: gh, Pin: origin cli.github.com, Pin-Priority: 600, then re-run sudo apt update && sudo apt install gh. Verify with gh --version.

    That's four lines and covers the footgun without the docs team having to write a whole ESM explainer. Alternatively the instructions could end with "verify the installed version with gh --version; if it's older than the latest release listed on this page, see the pinning note" — same destination, less
    prescriptive.

    Arguments against adding this to the docs, to steelman the other side:

    • Scope creep. If cli/cli documents every distro's pin-priority gotcha, the install page doubles in length and gets less scannable for the 95% of users on non-ESM systems who would just be confused by the note.
    • Ubuntu Pro is paid (though free for personal use up to 5 machines), so some docs teams draw the line at "we don't support paid distro add-ons."
    • The ESM version is, in a sense, "a valid install of gh on Ubuntu" — it just isn't the current gh. From a "you have a working gh" perspective the docs delivered.

    I don't find those arguments compelling for this case because:

    1. The page's implicit contract is "after following these steps, you have the GitHub CLI from GitHub's own repo" — that's the whole point of adding the cli.github.com apt source. ESM users come out of it with a binary from a completely different origin, which is a failed expectation even by a charitable reading.
    2. 2.45 is old enough to actively misbehave against the current GitHub API (the Projects (classic) GraphQL error we saw isn't cosmetic — it means the binary is making queries against deprecated fields), not just "missing a few features." A user who installed following the docs will hit functional bugs, not just a
      version-lag annoyance.
    3. Ubuntu Pro is now free-for-personal-use and on by default on some cloud images. This is not a niche configuration.

    So: yes, the docs could reasonably document this, and filing a small issue or PR against cli/cli pointing out the bug-by-outcome would be a legitimate contribution. If you want, I can draft a short issue body you can post to https://github.com/cli/cli/issues/new — something along the lines of "install_linux.md
    Debian/Ubuntu instructions don't account for Ubuntu Pro ESM pin priority, resulting in the wrong version being installed" with the apt-cache policy output and the proposed admonition text. Your call — I won't file it without your go-ahead, and if you'd rather just move on with the local fix and let someone else
    report it eventually, that's also completely reasonable.

  25. everslick commented on Jun 13, 2026

    @everslick
    #!/usr/bin/env bash
    #
    # Fix `gh issue view` failing with:
    #   GraphQL: Projects (classic) is being deprecated ... (repository.issue.projectCards)
    #
    # Cause: Ubuntu ships an old gh (2.45.0) that queries the deprecated classic
    # Projects field. GitHub now returns that deprecation as a hard error.
    # Fix: replace the Ubuntu package with the official GitHub CLI apt repo, which
    # carries a current gh that no longer queries projectCards.
    
    set -euo pipefail
    
    echo ">> Current gh:"
    gh --version 2>/dev/null | head -1 || echo "   (not installed)"
    
    # 1. Remove the Ubuntu-packaged gh so it can't shadow the official one.
    echo ">> Removing Ubuntu-packaged gh (if present)..."
    sudo apt-get remove -y gh 2>/dev/null || true
    
    # 2. Add GitHub's official apt repository and signing key.
    echo ">> Adding official GitHub CLI apt repository..."
    sudo mkdir -p -m 755 /etc/apt/keyrings
    wget -nv -O- https://cli.github.com/packages/githubcli-archive-keyring.gpg \
      | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg >/dev/null
    sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg
    
    echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" \
      | sudo tee /etc/apt/sources.list.d/github-cli.list >/dev/null
    
    # 3. Install the current gh from the official repo.
    echo ">> Installing current gh..."
    sudo apt-get update
    sudo apt-get install -y gh
    
    # 4. Verify.
    echo ">> New gh:"
    hash -r
    gh --version | head -1
    
    echo ">> Done. 'gh issue view' should now work without the projectCards error."
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    gh-issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions