Skip to content

Commit

Permalink
Add PgOrderByRelatedPlugin to GraphQL query package
Browse files Browse the repository at this point in the history
Incorporated the PgOrderByRelatedPlugin to enhance querying capabilities by allowing ordering based on related entities. Updated the package.json and yarn.lock files to include the new dependency, ensuring all relevant configurations are in place.
  • Loading branch information
jorgecuesta committed Dec 3, 2024
1 parent c30a3c9 commit 3fdc6ca
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
],
"dependencies": {
"@graphile-contrib/pg-many-to-many": "^1.0.2",
"@graphile-contrib/pg-order-by-related": "^1.0.0",
"@graphile-contrib/pg-simplify-inflector": "^6.1.0",
"@graphile/pg-aggregates": "^0.1.1",
"@graphile/pg-pubsub": "^4.13.0",
Expand Down
2 changes: 2 additions & 0 deletions packages/query/src/graphql/plugins/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import PgConnectionTotalCount from '@subql/x-graphile-build-pg/node8plus/plugins
import PgSimplifyInflectorPlugin from '@graphile-contrib/pg-simplify-inflector';
import PgManyToManyPlugin from '@graphile-contrib/pg-many-to-many';
import ConnectionFilterPlugin from 'postgraphile-plugin-connection-filter';
import PgOrderByRelatedPlugin from '@graphile-contrib/pg-order-by-related';

// custom plugins
import PgConnectionArgFirstLastBeforeAfter from './PgConnectionArgFirstLastBeforeAfter';
Expand Down Expand Up @@ -113,6 +114,7 @@ const plugins = [
PgRowByVirtualIdPlugin,
PgDistinctPlugin,
PgSearchPlugin,
PgOrderByRelatedPlugin,
makeAddInflectorsPlugin((inflectors) => {
const {constantCase: oldConstantCase} = inflectors;
const enumValues = new Set();
Expand Down
8 changes: 8 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4050,6 +4050,13 @@ __metadata:
languageName: node
linkType: hard

"@graphile-contrib/pg-order-by-related@npm:^1.0.0":
version: 1.0.0
resolution: "@graphile-contrib/pg-order-by-related@npm:1.0.0"
checksum: e5fa3655075b6c499926cf954e809ff827d23710919662a4a1de5a342b2d9874f7b5d47e4d7924aa8da65a3e33e716c57326358ef4cb8812ea125e21abefdd31
languageName: node
linkType: hard

"@graphile-contrib/pg-simplify-inflector@npm:^6.1.0":
version: 6.1.0
resolution: "@graphile-contrib/pg-simplify-inflector@npm:6.1.0"
Expand Down Expand Up @@ -6860,6 +6867,7 @@ __metadata:
resolution: "@subql/query@workspace:packages/query"
dependencies:
"@graphile-contrib/pg-many-to-many": ^1.0.2
"@graphile-contrib/pg-order-by-related": ^1.0.0
"@graphile-contrib/pg-simplify-inflector": ^6.1.0
"@graphile/pg-aggregates": ^0.1.1
"@graphile/pg-pubsub": ^4.13.0
Expand Down

0 comments on commit 3fdc6ca

Please sign in to comment.