Skip to content

Complete GraphQL Integration#255

Merged
gdamron merged 26 commits intomainfrom
gdamron/integrate-graphql-2
Feb 12, 2026
Merged

Complete GraphQL Integration#255
gdamron merged 26 commits intomainfrom
gdamron/integrate-graphql-2

Conversation

@gdamron
Copy link
Contributor

@gdamron gdamron commented Feb 10, 2026

Summary

This is a very large change that will require extensive testing before merging. It adds the last functionality to the GraphQL API that the reader needs to function and integrates GraphQL fully into the reader. There are a few outlier operations relying on the direct Supabase queries -- like fetching build-time work uuids -- but runtime queries have all been migrated.

This sets us up for some nice things, including:

  • resolving more complex data, such as passage labels for internal links and other annotations that have not yet been supported
  • shadow proxy migrations, such as post-processing annotations on demand after import from tei

Replace @Data-access client and passage functions with @client-graphql
equivalents for the infinite scroll pagination provider.
- Add PageInfo type to base.graphql for reuse across connections
- Update PassageConnection to include pageInfo field
- Mark inline pagination fields (nextCursor, prevCursor, etc.) as deprecated
- Resolver returns both pageInfo and deprecated fields for backward compatibility
- Update all GraphQL queries to use pageInfo { ... } instead of inline fields
- Update mappers and functions to read from pageInfo
- Regenerate TypeScript types
- Add passage(uuid: ID!) root query to fetch individual passages
- Add workUuid field to Passage type for work context
- Create passage.query.ts resolver and register in resolvers.ts
- Add getPassage function to client-graphql library
- Update all passage fragments and response types to include workUuid
- Update passageFromGraphQL mapper to use workUuid from response
- Add Permission enum and hasPermission query to user schema
- Add savePassages mutation to passage schema with PassageInput type
- Create passage.mutation.ts resolver for savePassages
- Add hasPermission and savePassages client functions
- Migrate EditorProvider from Supabase to GraphQL client
BREAKING CHANGE: The works query now returns WorkConnection instead of [Work!]!

- Update works query to accept cursor and limit parameters
- Remove deprecated worksConnection query
- Rename getWorksConnection to getWorks in client
- Update getTranslationUuids and getTranslationsMetadata to paginate
Migrate all lib-editing components to use getTranslationBlocks which
returns pre-transformed TipTap JSON, eliminating the need for
blocksFromTranslationBody transformation calls.
@vercel
Copy link

vercel bot commented Feb 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
mfe-reader Ready Ready Preview, Comment Feb 12, 2026 10:57pm
public-reader Ready Ready Preview, Comment Feb 12, 2026 10:57pm
scholars-room Ready Ready Preview, Comment Feb 12, 2026 10:57pm
3 Skipped Deployments
Project Deployment Actions Updated (UTC)
design-system Ignored Ignored Preview Feb 12, 2026 10:57pm
docs Ignored Ignored Preview Feb 12, 2026 10:57pm
graphql Ignored Ignored Preview Feb 12, 2026 10:57pm

Request Review

Use Promise.all to fetch endnotes, abbreviations, glossary, bibliography,
and body content concurrently instead of sequentially for faster page loads.
Use 'match' instead of '~' for PostgREST regex filtering, consistent
with the FORWARD/BACKWARD direction implementation.
The database allows null labels, so the schema should reflect this.
@gdamron
Copy link
Contributor Author

gdamron commented Feb 12, 2026

Integration looks good, but I'll be ready to roll back quickly if necessary.

@gdamron gdamron merged commit 4e5987f into main Feb 12, 2026
8 checks passed
@gdamron gdamron deleted the gdamron/integrate-graphql-2 branch February 12, 2026 22:59
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