@powerhousedao/vetra-builder-package 0.0.11 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -88,6 +88,7 @@ export const getResolvers = (subgraph) => {
88
88
  fetchAllBuilderAccounts: async (parent, args) => {
89
89
  const driveId = args.driveId || DEFAULT_DRIVE_ID;
90
90
  const search = args.search;
91
+ const sortOrder = args.sortOrder || "asc";
91
92
  let accounts = VetraReadModelProcessor.query(driveId, db)
92
93
  .selectFrom("builder_accounts")
93
94
  .selectAll();
@@ -98,6 +99,8 @@ export const getResolvers = (subgraph) => {
98
99
  .or("profile_description", "ilike", `%${search}%`);
99
100
  });
100
101
  }
102
+ // Add sorting by profile_name
103
+ accounts = accounts.orderBy("profile_name", sortOrder);
101
104
  const results = await accounts.execute();
102
105
  return results.map((account) => ({
103
106
  id: account.id,
@@ -72,6 +72,7 @@ export const schema = gql `
72
72
  fetchAllBuilderAccounts(
73
73
  driveId: String
74
74
  search: String
75
+ sortOrder: String
75
76
  ): [BuilderAccountType!]!
76
77
  fetchBuilderAccount(driveId: String, id: String!): BuilderAccountType
77
78
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@powerhousedao/vetra-builder-package",
3
3
  "description": "",
4
- "version": "0.0.11",
4
+ "version": "0.0.13",
5
5
  "license": "AGPL-3.0-only",
6
6
  "type": "module",
7
7
  "files": [