refactor(orgs): retire REST org service, migrate all callers to GQL#1322
Open
kevwilliams wants to merge 4 commits into
Open
refactor(orgs): retire REST org service, migrate all callers to GQL#1322kevwilliams wants to merge 4 commits into
kevwilliams wants to merge 4 commits into
Conversation
- Move organizationKeys into gql-service; delete organization.service.ts and organization.queries.ts - Add useOrganizations / useOrganization TanStack hooks backed by GQL service (same signatures, no call-site changes needed) - Migrate 6 SSR loaders and 3 CSR mutation hooks to GQL equivalents - Fix org adapter: coerce GQL null → undefined for namespace (z.string().optional() rejects null; GraphQL returns it for cluster-scoped resources) - Fix create/update mutations: add apiVersion+kind to request body - Remove unused REST session hooks from user.queries.ts
🧪 Test Summary
📎 ArtifactsVideos and screenshots from failed E2E tests:
|
user.service.ts was already dead — index.ts re-exported createUserGqlService as createUserService, so all callers were already hitting the GraphQL path. - Delete user.service.ts - Strip REST-only adapter functions and imports from user.adapter.ts - Rewrite user.adapter.test.ts with fromGatewayUser / fromGatewayUserIdentity coverage
Switch user.queries.ts hooks from createUserService to createUserGqlService, move userKeys into user.gql-service.ts, and clean up index.ts exports now that user.service.ts is gone.
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.
Consolidates the dual-implementation pattern for organizations (Phase 2 of the GraphQL migration). Deletes the REST service and query hooks; all callers now use
createOrganizationGqlService.Changes
organization.service.tsandorganization.queries.tsorganizationKeysintoorganization.gql-service.tsuseOrganizations/useOrganizationTanStack hooks backed by GQL (same signatures as retired REST hooks)null→undefinedfornamespace(z.string().optional()rejects null; GraphQL returns it for cluster-scoped resources)create/updatemutations: addapiVersion+kindto request body (Kubernetes API requires them)user.queries.tsNotes
Users resource not fully retired —
get/update/delete/updatePreferences/getUserIdentityhave no GraphQL schema coverage yet.Test plan
/org/:orgId/projectsloads without namespace validation error/account/billingloads