File tree Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Original file line number Diff line number Diff line change 1+ import "postgraphile" ;
2+
3+ export const FilterAllPlugin : GraphileConfig . Plugin = {
4+ name : "FilterAllPlugin" ,
5+ version : "0.0.0" ,
6+
7+ schema : {
8+ entityBehavior : {
9+ pgCodecAttribute : {
10+ inferred ( behavior , entity , build ) {
11+ return [ behavior , "filterBy" ] ;
12+ } ,
13+ } ,
14+ } ,
15+ } ,
16+ } ;
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import { SchemaResult } from "graphile-build";
2323import { makeWithPgClientViaPgClientAlreadyInTransaction } from "@dataplan/pg/adaptors/pg" ;
2424import { exportSchemaAsString } from "graphile-export" ;
2525import { importFromStringSync } from "module-from-string" ;
26+ import { FilterAllPlugin } from "../FilterAllPlugin" ;
2627
2728// TODO: remove this once Grafast gets it's planning under control :D
2829jest . setTimeout ( 300000 ) ;
@@ -48,6 +49,7 @@ const createPostGraphileSchema = async (
4849 makeV4Preset ( v4Options ) ,
4950 ...( anotherPreset ? [ anotherPreset ] : [ ] ) ,
5051 ] ,
52+ plugins : [ FilterAllPlugin ] ,
5153 pgServices : [
5254 {
5355 adaptor,
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { postgraphilePresetAmber } from "postgraphile/presets/amber";
55import { makeV4Preset , V4Options } from "postgraphile/presets/v4" ;
66import { makeSchema } from "postgraphile" ;
77import { PostGraphileConnectionFilterPreset } from "../../../src/index" ;
8+ import { FilterAllPlugin } from "../../FilterAllPlugin" ;
89
910const createPostGraphileSchema = async (
1011 pgClient : pg . PoolClient ,
@@ -19,6 +20,7 @@ const createPostGraphileSchema = async (
1920 makeV4Preset ( v4Options ) ,
2021 ...( anotherPreset ? [ anotherPreset ] : [ ] ) ,
2122 ] ,
23+ plugins : [ FilterAllPlugin ] ,
2224 pgServices : [
2325 {
2426 adaptor,
You can’t perform that action at this time.
0 commit comments