chore: upgrade to Houdini 2.0 / houdini-svelte 3.0#514
Draft
rbjornstad wants to merge 26 commits into
Draft
Conversation
56a957b to
6a37c6b
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Upgrades the app’s GraphQL toolchain to Houdini 2.0.x / houdini-svelte 3.0.x and applies the required migration changes across routes and UI components (non-exhaustive variants, flat interface-fragment shapes, explicit __typename, and updated type imports).
Changes:
- Bumped Houdini + related dependencies and adjusted build/runtime configuration (Houdini config URL, TS compiler flags, workspace pnpm settings, Docker base image).
- Updated queries/components to handle Houdini 2.0’s non-exhaustive union/interface variants and masking behavior (more inline-fragment field selection,
exhaustive()helper, index keys in{#each}where needed). - Refactored issue/activity log UI code to work with flat interface-fragment result shapes and Houdini runtime types.
Reviewed changes
Copilot reviewed 69 out of 72 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.json | Disables verbatimModuleSyntax (workaround for Houdini codegen) and enables isolatedModules. |
| src/routes/userInfo.gql | Adds explicit __typename on me selection. |
| src/routes/team/[team]/valkey/create/+page.svelte | Switches Houdini $houdini-generated route props typing to SvelteKit $types. |
| src/routes/team/[team]/valkey/+page.ts | Moves filter type import to $houdini/graphql/inputs. |
| src/routes/team/[team]/unleash/+page.svelte | Replaces local GraphQLError type with houdini/runtime’s GraphQLError. |
| src/routes/team/[team]/settings/service_accounts/[serviceAccountID]/token/create/+page.svelte | Switches to $types props typing. |
| src/routes/team/[team]/settings/service_accounts/[serviceAccountID]/binding/add/+page.svelte | Switches to $types props typing. |
| src/routes/team/[team]/settings/confirm_delete/+page.svelte | Uses QueryResult from houdini/runtime instead of $houdini. |
| src/routes/team/[team]/settings/+page.svelte | Uses QueryResult from houdini/runtime instead of $houdini. |
| src/routes/team/[team]/secrets/+page.ts | Moves filter type import to $houdini/graphql/inputs. |
| src/routes/team/[team]/repositories/+page.ts | Moves filter type import to $houdini/graphql/inputs. |
| src/routes/team/[team]/postgres/+page.ts | Moves filter type import to $houdini/graphql/inputs. |
| src/routes/team/[team]/opensearch/create/+page.svelte | Switches to $types props typing. |
| src/routes/team/[team]/opensearch/+page.ts | Moves filter type import to $houdini/graphql/inputs. |
| src/routes/team/[team]/members/AddMember.svelte | Moves input type import to $houdini/graphql/inputs. |
| src/routes/team/[team]/kafka/+page.ts | Moves filter type import to Houdini inputs (note: currently uses .js extension). |
| src/routes/team/[team]/jobs/+page.ts | Moves filter type import to $houdini/graphql/inputs. |
| src/routes/team/[team]/issues/+page.ts | Moves filter type import to $houdini/graphql/inputs. |
| src/routes/team/[team]/configs/+page.ts | Moves filter type import to $houdini/graphql/inputs. |
| src/routes/team/[team]/buckets/+page.ts | Moves filter type import to $houdini/graphql/inputs. |
| src/routes/team/[team]/bigquery/+page.ts | Moves filter type import to $houdini/graphql/inputs. |
| src/routes/team/[team]/applications/+page.ts | Moves filter type import to $houdini/graphql/inputs. |
| src/routes/team/[team]/alerts/query.gql | Duplicates fields into the concrete inline fragment selections for masked typing. |
| src/routes/team/[team]/alerts/PrometheusAlarmDetail.svelte | Moves ValueOf to houdini/runtime. |
| src/routes/team/[team]/alerts/+page.ts | Moves filter type import to $houdini/graphql/inputs. |
| src/routes/team/[team]/activity-log/+page.ts | Moves filter type import to $houdini/graphql/inputs. |
| src/routes/team/[team]/[env]/valkey/[valkey]/edit/+page.svelte | Switches to $types props typing. |
| src/routes/team/[team]/[env]/valkey/[valkey]/edit/+page.server.ts | Moves input type import to $houdini/graphql/inputs. |
| src/routes/team/[team]/[env]/valkey/[valkey]/delete/+page.svelte | Switches to $types props typing. |
| src/routes/team/[team]/[env]/postgres/[postgres]/delete/+page.svelte | Switches to $types props typing. |
| src/routes/team/[team]/[env]/opensearch/[opensearch]/edit/+page.svelte | Switches to $types props typing and reorders imports. |
| src/routes/team/[team]/[env]/opensearch/[opensearch]/edit/+page.server.ts | Moves input type import to $houdini/graphql/inputs. |
| src/routes/team/[team]/[env]/opensearch/[opensearch]/delete/+page.svelte | Switches to $types props typing. |
| src/routes/team/[team]/[env]/job/[job]/logs/query.gql | Reworks log destination selections for Houdini 2.0 masking/non-exhaustive behavior. |
| src/routes/team/[team]/[env]/job/[job]/logs/JobLogs.svelte | Replaces manual $props() typing with generated $result type. |
| src/routes/team/[team]/[env]/job/[job]/issues/+page.ts | Moves filter type import to $houdini/graphql/inputs. |
| src/routes/team/[team]/[env]/job/[job]/activity-log/+page.ts | Moves filter type import to $houdini/graphql/inputs. |
| src/routes/team/[team]/[env]/app/[app]/utilization/query.gql | Adjusts interface inline fragments to include needed shared fields per variant. |
| src/routes/team/[team]/[env]/app/[app]/utilization/+page.svelte | Uses new exhaustive() helper and updates field access from aliased shapes. |
| src/routes/team/[team]/[env]/app/[app]/resize/+page.svelte | Switches to $types props typing. |
| src/routes/team/[team]/[env]/app/[app]/logs/Logs.svelte | Uses generated $result type and switches {#each} keys to indexes for safety. |
| src/routes/team/[team]/[env]/app/[app]/issues/+page.ts | Moves filter type import to $houdini/graphql/inputs. |
| src/routes/team/[team]/[env]/app/[app]/image/+page.svelte | Switches to $types props typing. |
| src/routes/team/[team]/[env]/app/[app]/activity-log/+page.ts | Moves filter type import to $houdini/graphql/inputs. |
| src/routes/deployments/+page.ts | Moves filter type import to $houdini/graphql/inputs. |
| src/routes/admin/userSyncLog/query.gql | Refactors inline fragments for masking (but currently omits __typename). |
| src/routes/admin/userSyncLog/+page.svelte | Uses exhaustive() and index keys for iteration over union/interface results. |
| src/routes/admin/teams/+page.ts | Moves filter type import to $houdini/graphql/inputs. |
| src/routes/admin/service_accounts/[serviceAccountID]/token/create/+page.svelte | Switches to $types props typing. |
| src/routes/admin/service_accounts/[serviceAccountID]/binding/add/+page.svelte | Switches to $types props typing. |
| src/routes/admin/+layout.svelte | Switches to $types props typing. |
| src/routes/+layout.svelte | Switches to $types props typing. |
| src/lib/utils/houdini.ts | Adds exhaustive() + Exhaustive<T> helper for Houdini non-exhaustive variants. |
| src/lib/domain/vulnerability/SuppressFinding.svelte | Moves ValueOf to houdini/runtime. |
| src/lib/domain/vulnerability/BulkSuppressCVE.svelte | Moves ValueOf to houdini/runtime. |
| src/lib/domain/list-items/IssueListItem.svelte | Updates issue fragment handling for flat interface-fragment types. |
| src/lib/domain/list-items/DeploymentWithTeamListItem.svelte | Moves ValueOf to houdini/runtime. |
| src/lib/domain/list-items/DeploymentListItem.svelte | Moves ValueOf to houdini/runtime. |
| src/lib/domain/list-items/ActivityLogListItem.svelte | Adds runtime flattening to adapt flat interface fragment data for text components. |
| src/lib/domain/issues/CriticalIssueRow.svelte | Updates issue discrimination logic for flat interface-fragment types. |
| src/lib/domain/activity/TeamActivityCard.svelte | Moves ActivityLogFilter input type to $houdini/graphql/inputs. |
| src/lib/domain/activity/shared/texts/types.ts | Refactors ActivityLogEntry<T> typing to match flat type-keyed fragment shape. |
| src/lib/domain/activity/shared/texts/PostgresDeletedActivityLogEntryText.svelte | Broadens prop typing to ActivityLogEntryFragment$data to fit new fragment shape. |
| src/lib/domain/activity/shared/texts/DefaultText.svelte | Broadens prop typing to ActivityLogEntryFragment$data to fit new fragment shape. |
| src/client.ts | Removes per-client URL config and adds a type assertion for SSE handler compatibility. |
| src/app.d.ts | Adds global GraphQLErrorExtensions.code typing. |
| pnpm-workspace.yaml | Updates pnpm workspace build allowances and minimum release age exclusions for Houdini packages. |
| package.json | Updates dependency versions, including Houdini 2.0.1 / houdini-svelte 3.0.1. |
| pnpm-lock.yaml | Lockfile updates corresponding to dependency upgrades. |
| houdini.config.js | Sets url: '/graphql' and adjusts plugin config for new Houdini/houdini-svelte behavior. |
| Dockerfile | Switches base image from Alpine to the default Node image. |
| AGENTS.md | Documents Houdini 2.0 migration rules (non-exhaustive types + interface fragments). |
ecf802e to
7034189
Compare
c4bb46f to
5b3c979
Compare
…structure logDestinations query
… in metadata query
5b3c979 to
0aca027
Compare
Comment on lines
+202
to
+206
| const enumLike = activeTypeName | ||
| .replace(/Issue$/, '') | ||
| .replace(/([a-z])([A-Z])/g, '$1_$2') | ||
| .toUpperCase(); | ||
| return issueTypeLabel(typeName); | ||
| return issueTypeLabel(enumLike); |
Comment on lines
+42
to
+43
| "houdini": "2.0.2", | ||
| "houdini-svelte": "3.0.1", |
Comment on lines
+258
to
+266
| 1. **No `__typename`** — use the type-keyed nullable properties as discriminators: | ||
|
|
||
| ```typescript | ||
| // Wrong — __typename doesn't exist on the flat fragment type | ||
| if ($data.__typename === 'DeprecatedIngressIssue') { ... } | ||
|
|
||
| // Correct — check the nullable type-keyed property | ||
| if ($data.DeprecatedIngressIssue) { ... } | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upgrades Houdini from 1.x to 2.0.1 and houdini-svelte from 2.x to 3.0.1.
Key Changes
Houdini 2.0 Migration
{ __typename: "non-exhaustive; don't match this" }catch-all variant to every interface/union result type. Usedexhaustive()utility and index-based{#each}keys where needed.ActivityLogListItemand updatedActivityLogEntrytype.HoudiniClientno longer acceptsurl— moved tohoudini.config.js(url: '/graphql').__typename: Houdini 2.0 no longer auto-injects__typenameinto store values for inline fragments. Added explicitly to queries that rely on it.verbatimModuleSyntaxworkaround: Disabled in tsconfig due to Houdini codegen bug (emitsimport {}instead ofimport type {}). Added TODO to re-enable once fixed upstream.handlers.nextdue toGraphQLErrortype mismatch betweengraphql-sseand Houdini's re-exported type.Files Changed
houdini.config.js— added top-levelurl: '/graphql', restoredforceRunesMode: truetsconfig.json— disabledverbatimModuleSyntax, addedisolatedModulespackage.json/pnpm-lock.yaml— dependency upgradessrc/client.ts— type assertion for SSE handlerssrc/routes/userInfo.gql— explicit__typenamesrc/routes/+layout.svelte,+layout.ts— compatibility fixessrc/lib/utils/houdini.ts— newexhaustive()utilitysrc/lib/domain/activity/shared/texts/types.ts— updatedActivityLogEntryfor flat fragment typessrc/lib/domain/list-items/ActivityLogListItem.svelte— runtime flatten for text componentsKnown Issues
.houdini/graphql/inputs.tsusesimport {}instead ofimport type {}— tracked upstream__typenameon unions may need explicit__typenameadded (same pattern as userInfo.gql fix)Testing
pnpm run checkpasses (0 errors in user code)nais api proxy__typenamefix