Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub Tier is null #60

Open
5 tasks done
jycouet opened this issue Feb 8, 2024 · 0 comments
Open
5 tasks done

GitHub Tier is null #60

jycouet opened this issue Feb 8, 2024 · 0 comments

Comments

@jycouet
Copy link

jycouet commented Feb 8, 2024

Describe the bug

When I launch sponsorkit, I get this error:

TypeError: Cannot read properties of null (reading 'isOneTime')
    at xxx/node_modules/.pnpm/[email protected]/node_modules/sponsorkit/dist/index.cjs:478:25

Looking more into it, it seems that GitHub is returning null to the tier field now!

query {
  organization(login: "MY_ORG") {
    sponsorshipsAsMaintainer(first: 100) {
      totalCount
      pageInfo {
        endCursor
        hasNextPage
      }
      nodes {
        createdAt
        privacyLevel
        tier {             # <-- This field is null
          name
          isOneTime
          monthlyPriceInCents
          monthlyPriceInDollars
        }
        sponsorEntity {
          __typename
          ...on Organization {
            login
            name
            avatarUrl
            websiteUrl
          }
          ...on User {
            login
            name
            avatarUrl
            websiteUrl
          }
        }
      }
    }
  }
}

I did check in the online https://docs.github.com/en/graphql/overview/explorer of github, and yes, I get all sponsors, but no tier information (it's null).

I don't know from when, as it was working well before 👍
Any idea of where to ask for GitHub API changes ?

Should this case of tier null be handle? (I could do a PR, but I'm not sure it's wanted... as we lose a lot of info.)
Let me know

Reproduction

https://github.com/HoudiniGraphql/sponsors

System Info

System:
    OS: macOS 14.2.1
    CPU: (12) arm64 Apple M3 Pro
    Memory: 372.11 MB / 36.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 21.2.0 - ~/.nvm/versions/node/v21.2.0/bin/node
    Yarn: 1.22.21 - ~/.nvm/versions/node/v21.2.0/bin/yarn
    npm: 10.2.3 - ~/.nvm/versions/node/v21.2.0/bin/npm
    pnpm: 8.10.5 - ~/Library/pnpm/pnpm
    bun: 1.0.12 - ~/.bun/bin/bun
  Browsers:
    Chrome: 121.0.6167.160
    Safari: 17.2.1

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant