@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,
|