Skip to content

Commit

Permalink
More behaviors registered
Browse files Browse the repository at this point in the history
  • Loading branch information
benjie committed Sep 24, 2024
1 parent 63e8dde commit 588ef4b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ export const PgAllRowsPlugin: GraphileConfig.Plugin = {
"query:resource:connection": {
description:
'"connection" field for a resource at the root Query level',
entities: ["pgCodec"],
entities: ["pgCodec", "pgResource", "pgResourceUnique"],
},
"query:resource:list": {
description: '"list" field for a resource at the root Query level',
entities: ["pgCodec"],
entities: ["pgCodec", "pgResource", "pgResourceUnique"],
},
},
},
Expand Down
12 changes: 12 additions & 0 deletions graphile-build/graphile-build-pg/src/plugins/PgRelationsPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ declare global {
"singularRelation:resource:single": true;
"singularRelation:resource:list": true;
"singularRelation:resource:connection": true;
"manyRelation:resource:list": true;
"manyRelation:resource:connection": true;
}
interface SchemaOptions {
pgMutationPayloadRelations?: boolean;
Expand Down Expand Up @@ -525,6 +527,16 @@ export const PgRelationsPlugin: GraphileConfig.Plugin = {
"should we add a connection field to navigate this singular relationship (when we know there can be at most one)?",
entities: ["pgCodecRelation", "pgCodecRef"],
},
"manyRelation:resource:list": {
description:
"should we add a list field to navigate this relationship?",
entities: ["pgCodecRelation", "pgCodecRef"],
},
"manyRelation:resource:connection": {
description:
"should we add a connection field to navigate this relationship?",
entities: ["pgCodecRelation", "pgCodecRef"],
},
},
},
entityBehavior: {
Expand Down

0 comments on commit 588ef4b

Please sign in to comment.