Skip to content

fix(graphql): support GitHub and Bitbucket schemas in the editor config - #3451

Merged
setchy merged 3 commits into
mainfrom
fix/graphql-lsp-config
Oct 17, 2026
Merged

setchy merged 3 commits into
mainfrom
fix/graphql-lsp-config

Conversation

@setchy

@setchy setchy commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Why

graphql.config.ts — read by the VS Code GraphQL extension — referenced a schema file codegen no longer produced and a documents glob in a directory that no longer existed. The Bitbucket GraphQL documents had no editor schema at all.

What changed

  • graphql.config.ts is now a multi-project config:
    • github: the locally generated GitHub SDL snapshot + src/renderer/utils/forges/github/**/*.graphql
    • bitbucket: the public Atlassian gateway https://developer.atlassian.com/gateway/api/graphql (no credentials) + src/renderer/utils/forges/bitbucket/**/*.graphql
  • codegen.ts: adds a schema-ast output producing the GitHub snapshot at src/renderer/utils/forges/github/graphql/generated/schema.graphql.
  • No schema files are committed — the snapshot is generated locally and stays gitignored, as the repository already treats schema.graphql.

Verification

  • pnpm codegen writes the GitHub snapshot; git ignores it, nothing is tracked, and the working tree shows only codegen.ts + graphql.config.ts.
  • graphql-config loads both projects:
    • github: 1839 types resolved offline with GITHUB_TOKEN unset, 5 scoped documents.
    • bitbucket: 31,712 types resolved from the public gateway with no credentials; the fields/types the documents reference (me, notifications, InfluentsNotificationHeadItem, InfluentsNotificationReadState) are present.
  • Each forge's documents are scoped to its own project, so neither is validated against the other's schema.
  • pnpm check passes.

Notes

  • The Bitbucket schema uses the same public gateway setchy/atlassify uses, so no credentials are required.
  • Both external schemas trip graphql-js v17's interface/deprecation consistency check — the same class of issue that required assumeValid in codegen. This affects node-based tooling; the editor ships its own bundled graphql version. Recorded as a design risk in the change.

OpenSpec change: repair-graphql-lsp-config

@setchy
setchy requested a review from afonsojramos as a code owner October 17, 2026 03:57
Base automatically changed from fix/graphql-codegen-plugin-resolution to main October 17, 2026 04:01
@github-actions github-actions Bot added bug Something isn't working dependency Dependency updates and removed dependency Dependency updates labels Oct 17, 2026
graphql.config.ts pointed at a schema file codegen no longer produced and a documents directory that no longer exists, and the Bitbucket documents had no editor schema at all.

- Rewrite graphql.config.ts as a multi-project config: a github project (local gitignored snapshot + GitHub documents) and a bitbucket project (public Atlassian gateway + Bitbucket documents).
- Add a schema-ast output to codegen.ts so the GitHub snapshot is generated locally and stays gitignored (not committed).

The Bitbucket schema comes from https://developer.atlassian.com/gateway/api/graphql (public, no credentials), matching setchy/atlassify.

OpenSpec change: repair-graphql-lsp-config
@setchy
setchy force-pushed the fix/graphql-lsp-config branch from b4f2839 to bf2da31 Compare October 17, 2026 12:26
@setchy setchy changed the title fix(graphql): repair editor GraphQL config with a committed schema snapshot fix(graphql): support GitHub and Bitbucket schemas in the editor config Oct 17, 2026
…generates entry

Merging main into this branch nested the schema-ast output inside the Bitbucket output object, where a string key is not a valid property. The cache-disabled type check failed with TS2353 on that line.

- Move the GitHub schema snapshot output to a sibling 'generates' entry, inside the GITHUB_TOKEN gate because it needs the GitHub schema.
- Extract the shared GitHub schema pointer to a typed const so both GitHub outputs reference it.
@sonarqubecloud

Copy link
Copy Markdown

@setchy
setchy merged commit bd7711c into main Oct 17, 2026
19 checks passed
@setchy
setchy deleted the fix/graphql-lsp-config branch October 17, 2026 13:34
@github-actions github-actions Bot added this to the Release 7.10.0 milestone Oct 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in Gitify v7.10.0! 🎉

Downloads for macOS, Windows, and Linux are available on the release page.

Thanks for helping make Gitify better!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Development

Successfully merging this pull request may close these issues.

1 participant