Skip to content

refactor(nagg): consume app-view REST only — strip client GraphQL#231

Open
Kelbie wants to merge 2 commits into
feat/skeleton-content-crossfadefrom
feat/appview-strip-graphql
Open

refactor(nagg): consume app-view REST only — strip client GraphQL#231
Kelbie wants to merge 2 commits into
feat/skeleton-content-crossfadefrom
feat/appview-strip-graphql

Conversation

@Kelbie

@Kelbie Kelbie commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Removes all client-side GraphQL; naggFeedClient/dmEnvelopeClient now serve every read from nagg's REST app-view via client.rest(). Requires the matching nagg + nagg-ts PRs.

Changes

  • naggFeedClient.tsrunNaggQueryrunNaggRest (binding + responseSchema; no GraphQL, no appview→graphql fallback, no capability/timeout cascades). Deleted all 13 query constants + selection fragments, the graphqlToData distillers, the fallback wrappers, and the client-side thread reply merge.
  • Thread — now threadAppView({sort: relevant|ranked|new, viewer}); the viewer-specific relevance merge is computed server-side and the canonical NaggThread feeds buildThreadStructure + the server ordering manifest.
  • enricheventsAppView + profilesAppView. DM conversation/nostr/dm/conversation.
  • backend.ts — dropped the *_APPVIEW transport flags (app-view is the only Nostr transport). nostrGraphqlEndpoint retained ONLY for coco-core-bound integrations (mint enrichment, operator profiles) + recentPeopleProfiles, which don't route through nagg-ts — flagged for a separate migration.

Verification

type-check + lint + knip clean; 1650 tests / 148 suites green. Feed-client test suite repointed to REST mocks (incl. a "never issues a GraphQL request" guard). On-device verification pending.

🤖 Generated with Claude Code

Kelbie added 2 commits June 23, 2026 11:22
naggFeedClient now serves every read (feed/user-feed/posts/thread/
notifications/enrich/profiles) from nagg's REST app-view via client.rest:

- gut runNaggQuery -> runNaggRest (binding + responseSchema, no graphql,
  no appview->graphql fallback, no capability/timeout cascades).
- delete all 13 GraphQL query constants + selection fragments, the
  graphqlToData distillers, the fallback wrappers, and the client-side
  thread reply merge.
- thread now uses threadAppView({sort: relevant|ranked|new, viewer}),
  with the viewer-specific relevance merge computed server-side; the
  canonical NaggThread feeds buildThreadStructure + the server ordering
  manifest (FeedEvent/NoteMetrics/ProfileInfo are the canonical shapes).
- enrich uses eventsAppView + profilesAppView.
- dmEnvelopeClient: dmConversation via /nostr/dm/conversation binding.
- backend.ts: drop the *_APPVIEW transport flags (app-view is the only
  Nostr transport). nostrGraphqlEndpoint kept ONLY for coco-core-bound
  integrations (mint enrichment, operator profiles) + recentPeopleProfiles,
  which are not routed through nagg-ts (flagged for a separate migration).
- buildNostrDataLayer nagg tier is app-view-only.

Type-checks clean. WIP: the legacy naggFeedClient.test.ts (GraphQL-mock
based) + lint/knip still to update; on-device verification pending.
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.

1 participant