New:Microsoft Teams Notifications Are Now Available in Socket.Learn more โ†’
Get Started

@pgpmjs/migrate-client

Package Overview
Dependencies
Maintainers
1
Versions
189
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pgpmjs/migrate-client

Typed GraphQL ORM client for the Constructive Migrate API (db_migrate schema)

latest
Source
npmnpm
Version
1.19.3
Version published
Weekly downloads
1.5K
-34.37%
Maintainers
1
Weekly downloads
ย 
Created
Source

@pgpmjs/migrate-client

Typed GraphQL ORM client for the Constructive Migrate API (db_migrate schema).

Generated from migrate.graphql via @constructive-io/graphql-codegen.

Usage

import { createClient } from '@pgpmjs/migrate-client';

const db = createClient({
  endpoint: 'https://migrate.example.com/graphql',
  headers: { Authorization: 'Bearer <token>' },
});

// Fetch all sql_actions for a database
const result = await db.sqlAction.findMany({
  select: { id: true, name: true, deploy: true, revert: true, verify: true, content: true },
  where: { databaseId: { equalTo: '<database-uuid>' } },
}).unwrap();

console.log(result.sqlActions.nodes);

Regeneration

pnpm generate

This runs codegen against schemas/migrate.graphql and outputs to src/.

Education and Tutorials

๐Ÿ“ฆ Package Management

  • pgpm: ๐Ÿ–ฅ๏ธ PostgreSQL Package Manager for modular Postgres development. Works with database workspaces, scaffolding, migrations, seeding, and installing database packages.

๐Ÿงช Testing

  • pgsql-test: ๐Ÿ“Š Isolated testing environments with per-test transaction rollbacksโ€”ideal for integration tests, complex migrations, and RLS simulation.
  • pglite-test: ๐Ÿชถ Drop-in pgsql-test replacement backed by PGlite โ€” in-process Postgres, no server required, instance-per-suite isolation.
  • pgsql-seed: ๐ŸŒฑ PostgreSQL seeding utilities for CSV, JSON, SQL data loading, and pgpm deployment.
  • supabase-test: ๐Ÿงช Supabase-native test harness preconfigured for the local Supabase stackโ€”per-test rollbacks, JWT/role context helpers, and CI/GitHub Actions ready.
  • graphile-test: ๐Ÿ” Authentication mocking for Graphile-focused test helpers and emulating row-level security contexts.
  • pg-query-context: ๐Ÿ”’ Session context injection to add session-local context (e.g., SET LOCAL) into queriesโ€”ideal for setting role, jwt.claims, and other session settings.

๐Ÿง  Parsing & AST

  • pgsql-parser: ๐Ÿ”„ SQL conversion engine that interprets and converts PostgreSQL syntax.
  • libpg-query-node: ๐ŸŒ‰ Node.js bindings for libpg_query, converting SQL into parse trees.
  • pg-proto-parser: ๐Ÿ“ฆ Protobuf parser for parsing PostgreSQL Protocol Buffers definitions to generate TypeScript interfaces, utility functions, and JSON mappings for enums.
  • @pgsql/enums: ๐Ÿท๏ธ TypeScript enums for PostgreSQL AST for safe and ergonomic parsing logic.
  • @pgsql/types: ๐Ÿ“ Type definitions for PostgreSQL AST nodes in TypeScript.
  • @pgsql/utils: ๐Ÿ› ๏ธ AST utilities for constructing and transforming PostgreSQL syntax trees.

๐Ÿ“š Documentation & Skills

  • constructive-skills: ๐Ÿ“– Platform documentation and AI agent skills โ€” feature catalog, blueprint reference, SDK guides (i18n, billing, limits, events, uploads, security, entities, search, AI), and deployment guides.

Install skills for AI coding agents:

# All platform skills (security, blueprints, codegen, billing, etc.)
npx skills add constructive-io/constructive-skills

# Individual repo skills (pgpm, testing, CLI, search, etc.)
npx skills add https://github.com/constructive-io/constructive --skill pgpm
npx skills add https://github.com/constructive-io/constructive --skill constructive-testing

Credits

๐Ÿ›  Built by the Constructive team โ€” creators of modular Postgres tooling for secure, composable backends. If you like our work, contribute on GitHub.

Disclaimer

AS DESCRIBED IN THE LICENSES, THE SOFTWARE IS PROVIDED "AS IS", AT YOUR OWN RISK, AND WITHOUT WARRANTIES OF ANY KIND.

No developer or entity involved in creating this software will be liable for any claims or damages whatsoever associated with your use, inability to use, or your interaction with other users of the code, including any direct, indirect, incidental, special, exemplary, punitive or consequential damages, or loss of profits, cryptocurrencies, tokens, or anything else of value.

Keywords

graphql

FAQs

Package last updated on 24 Sep 2026

Related posts