Registry / database / postgres-graphql-data-service

postgres-graphql-data-service

JSON →
library3.0.0jsnpmunverified

An auto-generated GraphQL API layer for PostgreSQL databases that provides CRUD operations, aggregation queries, and transaction support without requiring schema definitions. Version 3.0.0 fixes SQL injection vulnerabilities. It is intended for quick prototyping or simple deployments, but lacks active maintenance, TypeScript types, and support for subscriptions or complex joins. The package is a standalone service (not a library) and requires manual setup via environment variables.

npm install postgres-graphql-data-service
INSTALL
IMPORT
SIG · POSTGRES-GRAPHQL-D
P
postgres-graphql-data-service
databasejavascriptv3.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

pgrm
✓ Not importable as a library; run as a service via `npm start`
This package is not a library; it is a standalone server. No import statements used.

Shows how to set up and run the Postgres GraphQL Data Service locally.

# Clone and setup Install packages: npm install Configure .env: set PG_DB_HOST, PG_DB_PORT, PG_DB_USER, PG_DB_PASS, PG_DB_NAME Start service: npm start Open GraphQL endpoint at http://localhost:80/graphql
Debug
Known issues
gotchaThe package is a service, not an importable library. Do not attempt to require or import it.
fix
Run using npm start or directly with node.
affects: >=3.0.0
gotchaNo TypeScript support, types, or code completions provided.
fix
Use JavaScript only or create your own type definitions.
affects: >=2.0.0
gotchaThe README indicates SQL injection was fixed in version 3.0.0, implying previous versions may be vulnerable.
fix
Upgrade to version 3.0.0 or later.
affects: <3.0.0
gotchaPort 80 is default; on Unix systems without root, it may fail to bind. Use a higher port like 3000 in .env.
fix
Set PORT environment variable to a value > 1024.
affects: >=1.0.0
Errors
Common errors & fixes
Error: listen EACCES: permission denied 0.0.0.0:80
Port 80 requires elevated privileges on Linux/macOS.
fix
Change PORT in .env to a value > 1024 (e.g., 3000).
Error: Cannot find module 'pg'
Missing PostgreSQL client dependency.
fix
Run npm install to install dependencies.
Error: connect ECONNREFUSED 127.0.0.1:5432
PostgreSQL server is not running or connection details are incorrect.
fix
Ensure PostgreSQL is running and check .env settings for host and port.
Upgrade
Version history
3.0.0latest on npm
Audit
Dependencies
pgrequiredPostgreSQL client for database connectivity
graphqlrequiredGraphQL runtime for building the API
Agent activity
2 hits · last 30 days
node
2
Resources
postgres-graphql-data-service — npm install postgres-graphql-data-service · libregistry