UNPKG

graphile-settings

Version:
33 lines (32 loc) 1.46 kB
/** * Upload resolver for the Constructive upload plugin. * * Reads CDN/S3/MinIO configuration from environment variables (via getEnvOptions) * and streams uploaded files to the configured storage backend. * * Lazily initializes the S3 streamer on first upload to avoid requiring * env vars at module load time. * * ENV VARS: * BUCKET_PROVIDER - 'minio' | 's3' (default: 'minio') * BUCKET_NAME - bucket name (default: 'test-bucket') * AWS_REGION - AWS region (default: 'us-east-1') * AWS_ACCESS_KEY - access key (default: 'minioadmin') * AWS_SECRET_KEY - secret key (default: 'minioadmin') * CDN_ENDPOINT - S3-compatible endpoint (default: 'http://localhost:9000') */ import type { UploadFieldDefinition } from 'graphile-upload-plugin'; /** * Upload field definitions for Constructive's three upload domain types. * * These match columns whose PostgreSQL type is one of the domains defined * in constructive-db/pgpm-modules/types/: * * - `image` (public schema) — jsonb domain for images with versions * - `upload` (public schema) — jsonb domain for generic file uploads * - `attachment` (public schema) — text domain for simple URL attachments * * These domain types are part of the platform's core type system, deployed * to every application database. They rarely change, so this config is stable. */ export declare const constructiveUploadFieldDefinitions: UploadFieldDefinition[];