refactor(nagg): consume app-view REST only — strip client GraphQL#231
Open
Kelbie wants to merge 2 commits into
Open
refactor(nagg): consume app-view REST only — strip client GraphQL#231Kelbie wants to merge 2 commits into
Kelbie wants to merge 2 commits into
Conversation
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.
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.
Removes all client-side GraphQL;
naggFeedClient/dmEnvelopeClientnow serve every read from nagg's REST app-view viaclient.rest(). Requires the matching nagg + nagg-ts PRs.Changes
naggFeedClient.ts—runNaggQuery→runNaggRest(binding + responseSchema; no GraphQL, no appview→graphql fallback, no capability/timeout cascades). Deleted all 13 query constants + selection fragments, thegraphqlToDatadistillers, the fallback wrappers, and the client-side thread reply merge.threadAppView({sort: relevant|ranked|new, viewer}); the viewer-specific relevance merge is computed server-side and the canonicalNaggThreadfeedsbuildThreadStructure+ the serverorderingmanifest.eventsAppView+profilesAppView. DM conversation →/nostr/dm/conversation.backend.ts— dropped the*_APPVIEWtransport flags (app-view is the only Nostr transport).nostrGraphqlEndpointretained 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