Skip to content

feat: migrate all resources to the real SuperOps GraphQL schema#9

Merged
asachs01 merged 1 commit into
mainfrom
fix/v2-migrate-resources
May 21, 2026
Merged

feat: migrate all resources to the real SuperOps GraphQL schema#9
asachs01 merged 1 commit into
mainfrom
fix/v2-migrate-resources

Conversation

@asachs01
Copy link
Copy Markdown
Member

Completes the schema migration started for assets in #8. Closes #7.

What

Every resource other than assets still queried the imaginary schema and would fail against the real SuperOps API. This migrates the rest and prunes the fictional ones.

Migrated to SuperOps' real schema (input:-argument queries, page-based pagination, corrected field names) — resource, types, mocks and integration tests rewritten for each:
tickets, clients, sites, alerts, contracts, technicians, knowledgeBase.

Removed — built entirely on the assumed schema, no standalone SuperOps API equivalent: runbooks, patches, remoteSessions, reports. (Patch/script data exists only as asset-scoped operations; may return later if scoped properly — noted in SCHEMA.md.)

Also: test mocks split into per-resource files under tests/mocks/handlers/; SCHEMA.md and README.md updated to the real API surface.

How it was done

Seven parallel agents, one per resource, each owning disjoint files (resources/X.ts, types/X.ts, tests/mocks/handlers/X.ts, tests/integration/X.test.ts), all following the merged assets resource as the reference pattern.

⚠️ Fidelity caveat

Corrected from SuperOps' public docs, not live introspection (no API tenant was available — see #7). Query names, the input: convention and object field names are well-corroborated; input-type field names are best-effort and flagged with // NOTE: unverified against live API comments. They should be confirmed against a live tenant.

Verification

npm ci + lint + typecheck + build + test + smoke test all green — 157 tests pass across 13 files.

Release

Breaking change → semantic-release will cut v3.0.0 on merge. As with #8, I did not auto-merge — your call on review and merge timing.

Completes the v2 migration started for assets (#8). Every remaining
resource queried an assumed schema the real SuperOps API rejects.

- Migrate tickets, clients, sites, alerts, contracts, technicians and
  knowledge-base to SuperOps' real schema: `input:`-argument queries,
  page-based pagination (Page<T>/PageParams), and corrected type/field
  names. Each resource + its types, mocks and integration tests were
  rewritten.
- Remove runbooks, patches, remote-sessions and reports — built
  entirely on the assumed schema with no standalone SuperOps API
  equivalent (see SCHEMA.md).
- Split test mocks into per-resource files under tests/mocks/handlers/.
- Update SCHEMA.md and the README to the real API surface.

Fidelity caveat: corrected from public docs, not live introspection;
unverified input-type fields are flagged in source. See SCHEMA.md and #7.

BREAKING CHANGE: all resource APIs changed to match SuperOps' real
GraphQL schema; list methods return page-based Page<T>; the runbooks,
patches, remoteSessions and reports resources were removed.
@asachs01 asachs01 merged commit 193786c into main May 21, 2026
2 checks passed
@asachs01 asachs01 deleted the fix/v2-migrate-resources branch May 21, 2026 01:56
github-actions Bot pushed a commit that referenced this pull request May 21, 2026
# [3.0.0](v2.0.0...v3.0.0) (2026-05-21)

### Features

* migrate all resources to the real SuperOps GraphQL schema ([#9](#9)) ([193786c](193786c)), closes [#7](#7)

### BREAKING CHANGES

* all resource APIs changed to match SuperOps' real
GraphQL schema; list methods return page-based Page<T>; the runbooks,
patches, remoteSessions and reports resources were removed.
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

Successfully merging this pull request may close these issues.

v2.0.0: migrate all resources to the real SuperOps GraphQL schema

1 participant