chore: Remove Altair GraphQL IDE support#824
Conversation
…phiQL interface provided by GraphQL Yoga
🦋 Changeset detectedLatest commit: 2e728fd The changes in this PR will be included in the next version bump. This PR includes changesets to release 21 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
📝 WalkthroughWalkthroughRemoves Altair GraphQL IDE support across the repository: dependency removals, deletion of development-time Altair registration, updates to Fastify generator templates/constants, and plugin signature adjustments to callback-style done() completion. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.claude/settings.json (1)
53-65: Unrelated changes bundled in this PR.These changes (adding
Bash(echo $?)permission,mcp__linear-server__get_issuepermission, and reformattingenabledMcpjsonServers) appear unrelated to removing Altair GraphQL IDE support. Consider splitting these into a separate PR for cleaner change tracking.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.claude/settings.json around lines 53 - 65, This PR includes unrelated permission and formatting changes that should be split out: remove or exclude the added permission entries "Bash(echo $?)" and "mcp__linear-server__get_issue" and revert the reformatting of the "enabledMcpjsonServers" array from this Altair GraphQL IDE removal PR, and instead create a separate PR that introduces those permissions and formatting changes; locate these edits by searching for the symbols "Bash(echo $?)", "mcp__linear-server__get_issue", and "enabledMcpjsonServers" in .claude/settings.json and move them to the dedicated follow-up change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.claude/settings.json:
- Around line 53-65: This PR includes unrelated permission and formatting
changes that should be split out: remove or exclude the added permission entries
"Bash(echo $?)" and "mcp__linear-server__get_issue" and revert the reformatting
of the "enabledMcpjsonServers" array from this Altair GraphQL IDE removal PR,
and instead create a separate PR that introduces those permissions and
formatting changes; locate these edits by searching for the symbols "Bash(echo
$?)", "mcp__linear-server__get_issue", and "enabledMcpjsonServers" in
.claude/settings.json and move them to the dedicated follow-up change.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: ad4c9b17-62fb-4d1b-a355-a19381c0eb11
⛔ Files ignored due to path filters (7)
examples/blog-with-auth/apps/backend/baseplate/generated/package.jsonis excluded by!**/generated/**,!**/generated/**examples/blog-with-auth/apps/backend/baseplate/generated/src/plugins/graphql/index.tsis excluded by!**/generated/**,!**/generated/**examples/blog-with-auth/pnpm-lock.yamlis excluded by!**/pnpm-lock.yamlexamples/todo-with-better-auth/apps/backend/baseplate/generated/package.jsonis excluded by!**/generated/**,!**/generated/**examples/todo-with-better-auth/apps/backend/baseplate/generated/src/plugins/graphql/index.tsis excluded by!**/generated/**,!**/generated/**examples/todo-with-better-auth/pnpm-lock.yamlis excluded by!**/pnpm-lock.yamltests/simple/snapshots/root/diffs/pnpm-lock.yaml.diffis excluded by!tests/**
📒 Files selected for processing (9)
.changeset/remove-altair-support.md.claude/settings.jsonexamples/blog-with-auth/apps/backend/package.jsonexamples/blog-with-auth/apps/backend/src/plugins/graphql/index.tsexamples/todo-with-better-auth/apps/backend/package.jsonexamples/todo-with-better-auth/apps/backend/src/plugins/graphql/index.tspackages/fastify-generators/src/constants/fastify-packages.tspackages/fastify-generators/src/generators/yoga/yoga-plugin/templates/src/plugins/graphql/index.tspackages/fastify-generators/src/generators/yoga/yoga-plugin/yoga-plugin.generator.ts
💤 Files with no reviewable changes (7)
- examples/todo-with-better-auth/apps/backend/package.json
- examples/blog-with-auth/apps/backend/src/plugins/graphql/index.ts
- packages/fastify-generators/src/generators/yoga/yoga-plugin/templates/src/plugins/graphql/index.ts
- packages/fastify-generators/src/constants/fastify-packages.ts
- examples/blog-with-auth/apps/backend/package.json
- examples/todo-with-better-auth/apps/backend/src/plugins/graphql/index.ts
- packages/fastify-generators/src/generators/yoga/yoga-plugin/yoga-plugin.generator.ts
There was a problem hiding this comment.
🧹 Nitpick comments (2)
examples/todo-with-better-auth/apps/backend/src/plugins/graphql/index.ts (1)
53-151: Add JSDoc and an explicit return type on the exported plugin callback.This exported plugin currently misses required JSDoc, and the callback passed to
fp(...)should declare an explicitvoidreturn type.Proposed patch
+/** + * Registers the GraphQL Yoga route and related middleware. + * + * `@param` fastify Fastify instance. + * `@param` opts Plugin options. + * `@param` done Callback invoked when plugin registration is complete. + * `@returns` void + */ -export const graphqlPlugin = fp((fastify, opts, done) => { +export const graphqlPlugin = fp((fastify, opts, done): void => { const graphQLServer = createYoga<{ req: FastifyRequest; reply: FastifyReply; }>({ @@ done(); });As per coding guidelines:
examples/todo-with-better-auth/**/*.{ts,tsx}requires explicit return types, andexamples/todo-with-better-auth/**/*.{ts,tsx,js,jsx}requires JSDoc on exported functions.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@examples/todo-with-better-auth/apps/backend/src/plugins/graphql/index.ts` around lines 53 - 151, The exported graphqlPlugin lacks a JSDoc block and the callback passed into fp(...) is missing an explicit void return type; add a JSDoc comment above the exported graphqlPlugin describing its purpose/params, and update the fp callback signature to declare a void return type (e.g., change fp((fastify, opts, done) => { ... }) to fp((fastify, opts, done): void => { ... })), ensuring references to createYoga, httpHandler, and done remain unchanged.examples/blog-with-auth/apps/backend/src/plugins/graphql/index.ts (1)
53-151: Add JSDoc and an explicit return type on the exported plugin callback.
graphqlPluginis exported without JSDoc, and the callback passed tofp(...)has no explicit return type annotation.Proposed patch
+/** + * Registers the GraphQL Yoga route and related middleware. + * + * `@param` fastify Fastify instance. + * `@param` opts Plugin options. + * `@param` done Callback invoked when plugin registration is complete. + * `@returns` void + */ -export const graphqlPlugin = fp((fastify, opts, done) => { +export const graphqlPlugin = fp((fastify, opts, done): void => { const graphQLServer = createYoga<{ req: FastifyRequest; reply: FastifyReply; }>({ @@ done(); });As per coding guidelines:
examples/blog-with-auth/**/*.{ts,tsx}requires explicit return types for functions and JSDocs on all exported functions.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@examples/blog-with-auth/apps/backend/src/plugins/graphql/index.ts` around lines 53 - 151, Add a JSDoc comment above the exported graphqlPlugin and give the fp callback an explicit return type (i.e., annotate the arrow function passed to fp with the appropriate Fastify plugin callback type such as FastifyPluginCallback or FastifyPluginAsync) so the exported const graphqlPlugin has a documented purpose and an explicit function return type; update the declaration around graphqlPlugin and the callback passed to fp(...) (the function taking fastify, opts, done) to include these annotations and a brief JSDoc describing the plugin.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@examples/blog-with-auth/apps/backend/src/plugins/graphql/index.ts`:
- Around line 53-151: Add a JSDoc comment above the exported graphqlPlugin and
give the fp callback an explicit return type (i.e., annotate the arrow function
passed to fp with the appropriate Fastify plugin callback type such as
FastifyPluginCallback or FastifyPluginAsync) so the exported const graphqlPlugin
has a documented purpose and an explicit function return type; update the
declaration around graphqlPlugin and the callback passed to fp(...) (the
function taking fastify, opts, done) to include these annotations and a brief
JSDoc describing the plugin.
In `@examples/todo-with-better-auth/apps/backend/src/plugins/graphql/index.ts`:
- Around line 53-151: The exported graphqlPlugin lacks a JSDoc block and the
callback passed into fp(...) is missing an explicit void return type; add a
JSDoc comment above the exported graphqlPlugin describing its purpose/params,
and update the fp callback signature to declare a void return type (e.g., change
fp((fastify, opts, done) => { ... }) to fp((fastify, opts, done): void => { ...
})), ensuring references to createYoga, httpHandler, and done remain unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: c5e0568c-be70-40ed-ac3e-0d5da6de5c86
⛔ Files ignored due to path filters (2)
examples/blog-with-auth/apps/backend/baseplate/generated/src/plugins/graphql/index.tsis excluded by!**/generated/**,!**/generated/**examples/todo-with-better-auth/apps/backend/baseplate/generated/src/plugins/graphql/index.tsis excluded by!**/generated/**,!**/generated/**
📒 Files selected for processing (3)
examples/blog-with-auth/apps/backend/src/plugins/graphql/index.tsexamples/todo-with-better-auth/apps/backend/src/plugins/graphql/index.tspackages/fastify-generators/src/generators/yoga/yoga-plugin/templates/src/plugins/graphql/index.ts
…phiQL interface provided by GraphQL Yoga
Summary by CodeRabbit