Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@constructive-io/graphql-env

Latest version: v3.38.0

Overview

Last scanned
28 Nov 2026
Published
28 Nov 2026
npm package Publisher: phatg, pyramation, zetazz
62 Stars
7 Forks
30 Versions
61.6K Downloads
TypeScript Repo language

Scan summary

@constructive-io/graphql-env was last scanned on 28 Nov 2026 at version 3.38.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 30 versions; the latest 4 were published within 6 days (23–28 Nov 2026).
  • Findings: No rules fired in version 3.38.0.
  • Downloads: 61,627 downloads.

Versions

30 versions published
Versions and the rules that fired in each
VersionPublishedStatus
3.38.0 LATEST 28 Nov 2026 No rules fired
3.37.8 26 Nov 2026 No rules fired
3.37.7 26 Nov 2026 No rules fired
3.37.6 23 Nov 2026 Not shown
3.37.5 19 Nov 2026 Not shown

No rules fired in 3.38.0

Findings

Findings for v3.38.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 3.38.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

@constructive-io/graphql-env

Constructive environment configuration with GraphQL/Graphile support.

This package extends @pgpmjs/env with GraphQL-specific environment variable parsing and defaults for Constructive applications.

Installation

npm install @constructive-io/graphql-env

Usage

import { getEnvOptions } from '@constructive-io/graphql-env';

// Get merged options (core PGPM + GraphQL defaults + env vars + config)
const options = getEnvOptions();

// With overrides
const options = getEnvOptions({
  graphile: { schema: ['public', 'app'] },
  features: { simpleInflection: true }
});

Environment Variables

In addition to all environment variables supported by @pgpmjs/env, this package parses:

GraphQL Schema
  • GRAPHILE_SCHEMA - Comma-separated list of PostgreSQL schemas to expose

The server always uses schema-scoped introspection for its main PostgreSQL service: each handler introspects only its API's schemas and their dependency closure. There is no switch back to stock introspection (main: false is rejected), because stock introspection retains the whole database in every cached handler. The scoped options are configured through the Graphile preset in pgpm.json or runtime options under graphile.preset.gather.pgScopedIntrospection.main.

Scoped introspection environment overrides

The server maps these variables to graphile.preset.gather.pgScopedIntrospection.main. main is the internal PostgreSQL service name, not the routing service name (such as local).

Variable Accepted values
GRAPHILE_SCOPED_INTROSPECTION_CATALOG_TYPES all or dependency-closure
GRAPHILE_SCOPED_INTROSPECTION_CAPABILITY_EXTENSIONS Comma-separated extension names, e.g. pg_trgm,vector
  • Unset variables do not override pgpm.json. With neither, the server uses Crystal's defaults (catalogTypes: "all").
  • Each variable overrides only its own field. Extension lists replace the configured array, trim names and remove duplicates. An explicitly empty or whitespace-only extension variable clears the list to []; unset preserves it.
  • Catalog values must match one of the two lowercase choices exactly; an empty catalog value is invalid. Empty CSV items such as pg_trgm,,vector are invalid. Invalid settings fail option resolution with the variable name.
  • Precedence remains defaults < config file < environment < explicit runtime options. These variables affect only main.
export GRAPHILE_SCOPED_INTROSPECTION_CATALOG_TYPES=dependency-closure
export GRAPHILE_SCOPED_INTROSPECTION_CAPABILITY_EXTENSIONS=pg_trgm,vector

Restart the server after changing its environment. capabilityExtensions retains introspection metadata for extension capabilities; it does not install PostgreSQL extensions or change the API's exposed schemas.

Grafast Cache Limits
  • GRAPHILE_QUERY_CACHE_MAX_LENGTH - Maximum parsed and validated queries retained per schema
  • GRAPHILE_OPERATIONS_CACHE_MAX_LENGTH - Maximum operations retained for plan lookup per schema
  • GRAPHILE_OPERATION_PLANS_CACHE_MAX_LENGTH - Maximum context/variable-specific plans retained per operation

Each cache limit must be a safe integer of at least 2. When omitted, Grafast's upstream default for that cache remains in effect.

Schema Build Limits
  • GRAPHILE_BUILD_CONCURRENCY - Handler builds that may run at once in the process (default 2, at least 1)
  • GRAPHILE_BUILD_QUEUE_MAX - Builds that may wait for a slot (default 64; 0 refuses at once while every slot is busy)
  • GRAPHILE_BUILD_QUEUE_WAIT_MS - How long a build may wait for a slot (default 30000; 0 never waits)

A request whose API has no cached handler waits for a build slot. When the queue is full or the wait expires, the request is refused with HTTP 503, a Retry-After header (the queue wait in seconds, at most 60) and the SCHEMA_BUILD_UNAVAILABLE error code, so clients and load balancers can retry. A build that cannot reach the database is answered the same way. Invalid values fail option resolution with the variable name.

Grafast Explain
  • GRAPHILE_EXPLAIN - Allow clients to request Grafast plan/SQL output via the x-graphql-explain header (off unless set)
Feature Flags
  • FEATURES_SIMPLE_INFLECTION - Enable simple inflection plugin
  • FEATURES_OPPOSITE_BASE_NAMES - Enable opposite base names
  • FEATURES_POSTGIS - Enable PostGIS support
API Configuration
  • API_IS_PUBLIC - Whether API is public
  • API_EXPOSED_SCHEMAS - Comma-separated list of exposed schemas
  • API_META_SCHEMAS - Comma-separated list of meta schemas
  • API_ANON_ROLE - Anonymous role name
  • API_ROLE_NAME - Default role name
  • API_FLUSH_TOKEN - Bearer token required by POST /flush; the route is not mounted when unset
  • API_INTROSPECTION_ROLE - Role PostGraphile introspects as; unset means the pool's connecting role

Defaults

GraphQL defaults are provided by @constructive-io/graphql-types:

{
  graphile: {
    schema: [],
    extends: [],
    preset: {}
  },
  features: {
    simpleInflection: true,
    oppositeBaseNames: true,
    postgis: true
  },
  api: {
    exposedSchemas: [],
    anonRole: 'administrator',
    roleName: 'administrator',
    isPublic: true,
    metaSchemas: ['routing_public', 'metaschema_public', 'metaschema_modules_public']
  }
}

For example, this enables scoped introspection with the defaults for the server's default main service:

{
  "graphile": {
    "preset": {
      "gather": {
        "pgScopedIntrospection": { "main": true }
      }
    }
  }
}

Advanced options can be supplied when a service needs a specific catalog policy or extension capability:

{
  "graphile": {
    "preset": {
      "gather": {
        "pgScopedIntrospection": {
          "main": {
            "catalogTypes": "dependency-closure",
            "capabilityExtensions": ["pg_trgm"]
          }
        }
      }
    }
  }
}

When to Use

  • Use @constructive-io/graphql-env for Constructive applications that need GraphQL/Graphile configuration
  • Use @pgpmjs/env for pure PGPM tooling that doesn't need GraphQL support

Education and Tutorials

  1. 🚀 Quickstart: Getting Up and Running Get started with modular databases in minutes. Install prerequisites and deploy your first module.

  2. 📦 Modular PostgreSQL Development with Database Packages Learn to organize PostgreSQL projects with pgpm workspaces and reusable database modules.

  3. ✏️ Authoring Database Changes Master the workflow for adding, organizing, and managing database changes with pgpm.

  4. 🧪 End-to-End PostgreSQL Testing with TypeScript Master end-to-end PostgreSQL testing with ephemeral databases, RLS testing, and CI/CD automation.

  5. ⚡ Supabase Testing Use TypeScript-first tools to test Supabase projects with realistic RLS, policies, and auth contexts.

  6. 💧 Drizzle ORM Testing Run full-stack tests with Drizzle ORM, including database setup, teardown, and RLS enforcement.

  7. 🔧 Troubleshooting Common issues and solutions for pgpm, PostgreSQL, and testing.

Related Constructive Tooling

📦 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, safegres, testing, CLI, search, etc.)
npx skills add constructive-io/constructive --skill pgpm
npx skills add constructive-io/constructive --skill safegres
npx skills add 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.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @constructive-io/graphql-env

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

CVE

Java4Shell (CVE-2026-114938): Easy to Crash, Hard to Exploit — Less Than 0.12% of JVMs Estimated at Risk of RCE

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

Frame 2085668439 (1)
Group 1261154229