UNPKG

graphile-settings

Version:
81 lines (80 loc) 9.29 kB
"use strict"; /** * PostGraphile v5 Plugins * * This module exports all custom plugins (consolidated from graphile-misc-plugins). */ Object.defineProperty(exports, "__esModule", { value: true }); exports.createTrgmOperatorFactories = exports.createMatchesOperatorFactory = exports.createPgvectorAdapter = exports.createTrgmAdapter = exports.createBm25Adapter = exports.createTsvectorAdapter = exports.VectorCodecPreset = exports.VectorCodecPlugin = exports.bm25IndexStore = exports.Bm25CodecPreset = exports.Bm25CodecPlugin = exports.createTsvectorCodecPlugin = exports.TsvectorCodecPreset = exports.TsvectorCodecPlugin = exports.UnifiedSearchPreset = exports.createUnifiedSearchPlugin = exports.RequiredInputPreset = exports.RequiredInputPlugin = exports._cachedTablesMeta = exports._buildFieldMeta = exports._pgTypeToGqlType = exports.PublicKeySignature = exports.PgTypeMappingsPreset = exports.PgTypeMappingsPlugin = exports.MetaSchemaPreset = exports.MetaSchemaPlugin = exports.NoUniqueLookupPreset = exports.PrimaryKeyOnlyPreset = exports.NoUniqueLookupPlugin = exports.PrimaryKeyOnlyPlugin = exports.createUniqueLookupPlugin = exports.ManyToManyOptInPreset = exports.ManyToManyOptInPlugin = exports.EnableAllFilterColumnsPreset = exports.EnableAllFilterColumnsPlugin = exports.InflectorLoggerPreset = exports.InflectorLoggerPlugin = exports.ConflictDetectorPreset = exports.ConflictDetectorPlugin = exports.InflektPreset = exports.InflektPlugin = exports.MinimalPreset = void 0; // Minimal preset - PostGraphile without Node/Relay features var minimal_preset_1 = require("./minimal-preset"); Object.defineProperty(exports, "MinimalPreset", { enumerable: true, get: function () { return minimal_preset_1.MinimalPreset; } }); // Custom inflector using inflekt library var custom_inflector_1 = require("./custom-inflector"); Object.defineProperty(exports, "InflektPlugin", { enumerable: true, get: function () { return custom_inflector_1.InflektPlugin; } }); Object.defineProperty(exports, "InflektPreset", { enumerable: true, get: function () { return custom_inflector_1.InflektPreset; } }); // Conflict detector for multi-schema setups var conflict_detector_1 = require("./conflict-detector"); Object.defineProperty(exports, "ConflictDetectorPlugin", { enumerable: true, get: function () { return conflict_detector_1.ConflictDetectorPlugin; } }); Object.defineProperty(exports, "ConflictDetectorPreset", { enumerable: true, get: function () { return conflict_detector_1.ConflictDetectorPreset; } }); // Inflector logger for debugging var inflector_logger_1 = require("./inflector-logger"); Object.defineProperty(exports, "InflectorLoggerPlugin", { enumerable: true, get: function () { return inflector_logger_1.InflectorLoggerPlugin; } }); Object.defineProperty(exports, "InflectorLoggerPreset", { enumerable: true, get: function () { return inflector_logger_1.InflectorLoggerPreset; } }); // Enable filtering on all columns (not just indexed) var enable_all_filter_columns_1 = require("./enable-all-filter-columns"); Object.defineProperty(exports, "EnableAllFilterColumnsPlugin", { enumerable: true, get: function () { return enable_all_filter_columns_1.EnableAllFilterColumnsPlugin; } }); Object.defineProperty(exports, "EnableAllFilterColumnsPreset", { enumerable: true, get: function () { return enable_all_filter_columns_1.EnableAllFilterColumnsPreset; } }); // Many-to-many with opt-in behavior var many_to_many_preset_1 = require("./many-to-many-preset"); Object.defineProperty(exports, "ManyToManyOptInPlugin", { enumerable: true, get: function () { return many_to_many_preset_1.ManyToManyOptInPlugin; } }); Object.defineProperty(exports, "ManyToManyOptInPreset", { enumerable: true, get: function () { return many_to_many_preset_1.ManyToManyOptInPreset; } }); // Primary key only lookups (disable non-PK unique constraints) var primary_key_only_1 = require("./primary-key-only"); Object.defineProperty(exports, "createUniqueLookupPlugin", { enumerable: true, get: function () { return primary_key_only_1.createUniqueLookupPlugin; } }); Object.defineProperty(exports, "PrimaryKeyOnlyPlugin", { enumerable: true, get: function () { return primary_key_only_1.PrimaryKeyOnlyPlugin; } }); Object.defineProperty(exports, "NoUniqueLookupPlugin", { enumerable: true, get: function () { return primary_key_only_1.NoUniqueLookupPlugin; } }); Object.defineProperty(exports, "PrimaryKeyOnlyPreset", { enumerable: true, get: function () { return primary_key_only_1.PrimaryKeyOnlyPreset; } }); Object.defineProperty(exports, "NoUniqueLookupPreset", { enumerable: true, get: function () { return primary_key_only_1.NoUniqueLookupPreset; } }); // Meta schema plugin for introspection (tables, fields, indexes, constraints) var meta_schema_1 = require("./meta-schema"); Object.defineProperty(exports, "MetaSchemaPlugin", { enumerable: true, get: function () { return meta_schema_1.MetaSchemaPlugin; } }); Object.defineProperty(exports, "MetaSchemaPreset", { enumerable: true, get: function () { return meta_schema_1.MetaSchemaPreset; } }); // PG type mappings for custom PostgreSQL types (email, url, etc.) var pg_type_mappings_1 = require("./pg-type-mappings"); Object.defineProperty(exports, "PgTypeMappingsPlugin", { enumerable: true, get: function () { return pg_type_mappings_1.PgTypeMappingsPlugin; } }); Object.defineProperty(exports, "PgTypeMappingsPreset", { enumerable: true, get: function () { return pg_type_mappings_1.PgTypeMappingsPreset; } }); // Public key signature plugin for crypto authentication var PublicKeySignature_1 = require("./PublicKeySignature"); Object.defineProperty(exports, "PublicKeySignature", { enumerable: true, get: function () { return PublicKeySignature_1.PublicKeySignature; } }); // Internal exports for testing var meta_schema_2 = require("./meta-schema"); Object.defineProperty(exports, "_pgTypeToGqlType", { enumerable: true, get: function () { return meta_schema_2._pgTypeToGqlType; } }); Object.defineProperty(exports, "_buildFieldMeta", { enumerable: true, get: function () { return meta_schema_2._buildFieldMeta; } }); Object.defineProperty(exports, "_cachedTablesMeta", { enumerable: true, get: function () { return meta_schema_2._cachedTablesMeta; } }); // Required input plugin - makes @requiredInput tagged fields non-nullable in mutation inputs var required_input_plugin_1 = require("./required-input-plugin"); Object.defineProperty(exports, "RequiredInputPlugin", { enumerable: true, get: function () { return required_input_plugin_1.RequiredInputPlugin; } }); Object.defineProperty(exports, "RequiredInputPreset", { enumerable: true, get: function () { return required_input_plugin_1.RequiredInputPreset; } }); // Unified search — tsvector + BM25 + pg_trgm + pgvector behind a single adapter architecture var graphile_search_1 = require("graphile-search"); // Core plugin + preset Object.defineProperty(exports, "createUnifiedSearchPlugin", { enumerable: true, get: function () { return graphile_search_1.createUnifiedSearchPlugin; } }); Object.defineProperty(exports, "UnifiedSearchPreset", { enumerable: true, get: function () { return graphile_search_1.UnifiedSearchPreset; } }); // Codec plugins (tree-shakable) Object.defineProperty(exports, "TsvectorCodecPlugin", { enumerable: true, get: function () { return graphile_search_1.TsvectorCodecPlugin; } }); Object.defineProperty(exports, "TsvectorCodecPreset", { enumerable: true, get: function () { return graphile_search_1.TsvectorCodecPreset; } }); Object.defineProperty(exports, "createTsvectorCodecPlugin", { enumerable: true, get: function () { return graphile_search_1.createTsvectorCodecPlugin; } }); Object.defineProperty(exports, "Bm25CodecPlugin", { enumerable: true, get: function () { return graphile_search_1.Bm25CodecPlugin; } }); Object.defineProperty(exports, "Bm25CodecPreset", { enumerable: true, get: function () { return graphile_search_1.Bm25CodecPreset; } }); Object.defineProperty(exports, "bm25IndexStore", { enumerable: true, get: function () { return graphile_search_1.bm25IndexStore; } }); Object.defineProperty(exports, "VectorCodecPlugin", { enumerable: true, get: function () { return graphile_search_1.VectorCodecPlugin; } }); Object.defineProperty(exports, "VectorCodecPreset", { enumerable: true, get: function () { return graphile_search_1.VectorCodecPreset; } }); // Adapters Object.defineProperty(exports, "createTsvectorAdapter", { enumerable: true, get: function () { return graphile_search_1.createTsvectorAdapter; } }); Object.defineProperty(exports, "createBm25Adapter", { enumerable: true, get: function () { return graphile_search_1.createBm25Adapter; } }); Object.defineProperty(exports, "createTrgmAdapter", { enumerable: true, get: function () { return graphile_search_1.createTrgmAdapter; } }); Object.defineProperty(exports, "createPgvectorAdapter", { enumerable: true, get: function () { return graphile_search_1.createPgvectorAdapter; } }); // Operator factories for connection filter integration Object.defineProperty(exports, "createMatchesOperatorFactory", { enumerable: true, get: function () { return graphile_search_1.createMatchesOperatorFactory; } }); Object.defineProperty(exports, "createTrgmOperatorFactories", { enumerable: true, get: function () { return graphile_search_1.createTrgmOperatorFactories; } });