We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
search
1 parent abb766a commit fac1f54Copy full SHA for fac1f54
src/graphql/helpers.ts
@@ -308,6 +308,12 @@ export async function fetchSpaces(args) {
308
params.push(where.domain);
309
}
310
311
+ if (where.search) {
312
+ const wildcardSearch = `%${where.search}%`;
313
+ queryStr += ` AND (s.id LIKE ? OR s.name LIKE ?)`;
314
+ params.push(wildcardSearch, wildcardSearch);
315
+ }
316
+
317
const query = `
318
SELECT s.*, skins.*, s.id AS id FROM spaces s
319
LEFT JOIN skins ON s.id = skins.id
src/graphql/schema.gql
@@ -128,6 +128,7 @@ input SpaceWhere {
128
controller: String
129
verified: Boolean
130
domain: String
131
+ search: String
132
133
134
input RankingWhere {
0 commit comments