@graphile-contrib/pg-many-to-many
Advanced tools
Comparing version 2.0.0-beta.3 to 2.0.0-beta.4
@@ -5,2 +5,5 @@ import { PgManyToManyRelationDetails, PgTableResource } from "."; | ||
namespace GraphileBuild { | ||
interface BehaviorStrings { | ||
manyToMany: true; | ||
} | ||
interface BehaviorEntities { | ||
@@ -7,0 +10,0 @@ pgManyToMany: PgManyToManyRelationDetails; |
@@ -18,9 +18,23 @@ "use strict"; | ||
schema: { | ||
behaviorRegistry: { | ||
add: { | ||
manyToMany: { | ||
description: "Should this table/relation expose a many-to-many relationship via GraphQL", | ||
entities: ["pgResource", "pgCodecRelation", "pgManyToMany"], | ||
}, | ||
connection: { | ||
description: "Should we use a connection to represent this many-to-many relationship", | ||
entities: ["pgManyToMany"], | ||
}, | ||
list: { | ||
description: "Should we use a list to represent this many-to-many relationship", | ||
entities: ["pgManyToMany"], | ||
}, | ||
}, | ||
}, | ||
entityBehavior: { | ||
pgResource: "manyToMany select", | ||
pgCodecRelation: "manyToMany select", | ||
pgResource: ["manyToMany", "select"], | ||
pgCodecRelation: ["manyToMany", "select"], | ||
pgManyToMany: { | ||
after: ["default", "inferred"], | ||
provides: ["override"], | ||
callback(behavior, relation, build) { | ||
override(behavior, relation, build) { | ||
const { junctionTable, rightTable, rightRelationName } = relation; | ||
@@ -32,3 +46,3 @@ const overrides = build.pgGetBehavior([ | ||
]); | ||
return ["manyToMany connection -list", behavior, overrides]; | ||
return ["manyToMany", "connection", "-list", behavior, overrides]; | ||
}, | ||
@@ -35,0 +49,0 @@ }, |
{ | ||
"name": "@graphile-contrib/pg-many-to-many", | ||
"version": "2.0.0-beta.3", | ||
"version": "2.0.0-beta.4", | ||
"description": "Add connection fields for many-to-many relations", | ||
@@ -27,3 +27,3 @@ "main": "dist/index.js", | ||
"@babel/preset-typescript": "^7.23.3", | ||
"@dataplan/pg": "^0.0.1-beta.19", | ||
"@dataplan/pg": "^0.0.1-beta.26", | ||
"@tsconfig/node18": "^18.2.4", | ||
@@ -34,8 +34,8 @@ "@typescript-eslint/eslint-plugin": "^6.13.1", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-plugin-graphile-export": "^0.0.2-beta.4", | ||
"eslint-plugin-graphile-export": "^0.0.2-beta.5", | ||
"eslint-plugin-jest": "^27.1.5", | ||
"eslint-plugin-prettier": "^4.2.1", | ||
"eslint_d": "^12.2.1", | ||
"grafast": "^0.1.1-beta.8", | ||
"graphile-build-pg": "^5.0.0-beta.22", | ||
"grafast": "^0.1.1-beta.15", | ||
"graphile-build-pg": "^5.0.0-beta.30", | ||
"graphql": "16.1.0-experimental-stream-defer.6", | ||
@@ -45,3 +45,3 @@ "jest": "^29.3.1", | ||
"pg": ">=6.1.0 <9", | ||
"postgraphile": "^5.0.0-beta.23", | ||
"postgraphile": "^5.0.0-beta.31", | ||
"prettier": "2.8.0", | ||
@@ -48,0 +48,0 @@ "typescript": "^5.0.0" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
83181
754