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, LaunchQL, or Sqitch 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.
Get started with GraphQL testing in seconds. Built on top of pgsql-test with seamless PostGraphile integration for isolated, role-aware testing.
Test Row-Level Security policies by switching between different user roles and authentication contexts. Perfect for testing GraphQL resolvers with proper authorization.
Use TypeScript interfaces for type-safe GraphQL testing with full IntelliSense support and compile-time error checking.