graphile-test
Robust GraphQL Testing Utilities
Build on top of pgsql-test to provide robust GraphQL testing utilities for PostGraphile-based projects with seamless setup for isolated, seeded, role-aware databases.
Via savepoints for complete isolation
Inject authentication contexts with setContext
Testing with query() and snapshot support
Streamline your GraphQL testing workflow
Every test runs in its own savepoint for complete isolation, ensuring clean state between GraphQL operations.
Use setContext() to simulate different user roles and authentication states for testing Row-Level Security.
Built-in query() function with snapshot support for comprehensive GraphQL mutation and query testing.
Support for .sql files, JSON, CSV, or pgpm seeding strategies for comprehensive test setup.
Capture and track changes in your GraphQL schema and query results with built-in snapshot testing.
Drop into raw SQL testing anytime via pg.client.query for maximum flexibility when needed.