Skip to content

Commit c13902e

Browse files
committed
refactor: replace isNotNull checks with isNull in agendaFolders and tagFolders
1 parent b183fd2 commit c13902e

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

src/graphql/types/Event/agendaFolders.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
eq,
77
exists,
88
gt,
9-
isNotNull,
9+
isNull,
1010
lt,
1111
or,
1212
} from "drizzle-orm";
@@ -103,12 +103,12 @@ Event.implement({
103103
eq(agendaFoldersTable.eventId, parent.id),
104104
eq(agendaFoldersTable.id, cursor.id),
105105
eq(agendaFoldersTable.name, cursor.name),
106-
isNotNull(agendaFoldersTable.parentFolderId),
106+
isNull(agendaFoldersTable.parentFolderId),
107107
),
108108
),
109109
),
110110
eq(agendaFoldersTable.eventId, parent.id),
111-
isNotNull(agendaFoldersTable.parentFolderId),
111+
isNull(agendaFoldersTable.parentFolderId),
112112
or(
113113
and(
114114
eq(agendaFoldersTable.name, cursor.name),
@@ -120,7 +120,7 @@ Event.implement({
120120
} else {
121121
where = and(
122122
eq(agendaFoldersTable.eventId, parent.id),
123-
isNotNull(agendaFoldersTable.parentFolderId),
123+
isNull(agendaFoldersTable.parentFolderId),
124124
);
125125
}
126126
} else {
@@ -135,12 +135,12 @@ Event.implement({
135135
eq(agendaFoldersTable.eventId, parent.id),
136136
eq(agendaFoldersTable.id, cursor.id),
137137
eq(agendaFoldersTable.name, cursor.name),
138-
isNotNull(agendaFoldersTable.parentFolderId),
138+
isNull(agendaFoldersTable.parentFolderId),
139139
),
140140
),
141141
),
142142
eq(agendaFoldersTable.eventId, parent.id),
143-
isNotNull(agendaFoldersTable.parentFolderId),
143+
isNull(agendaFoldersTable.parentFolderId),
144144
or(
145145
and(
146146
eq(agendaFoldersTable.name, cursor.name),
@@ -152,7 +152,7 @@ Event.implement({
152152
} else {
153153
where = and(
154154
eq(agendaFoldersTable.eventId, parent.id),
155-
isNotNull(agendaFoldersTable.parentFolderId),
155+
isNull(agendaFoldersTable.parentFolderId),
156156
);
157157
}
158158
}

src/graphql/types/Organization/tagFolders.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
eq,
77
exists,
88
gt,
9-
isNotNull,
9+
isNull,
1010
lt,
1111
or,
1212
} from "drizzle-orm";
@@ -159,13 +159,13 @@ Organization.implement({
159159
.where(
160160
and(
161161
eq(tagFoldersTable.id, cursor.id),
162-
isNotNull(tagFoldersTable.parentFolderId),
162+
isNull(tagFoldersTable.parentFolderId),
163163
eq(tagFoldersTable.name, cursor.name),
164164
eq(tagFoldersTable.organizationId, parent.id),
165165
),
166166
),
167167
),
168-
isNotNull(tagFoldersTable.parentFolderId),
168+
isNull(tagFoldersTable.parentFolderId),
169169
eq(tagFoldersTable.organizationId, parent.id),
170170
or(
171171
and(
@@ -177,7 +177,7 @@ Organization.implement({
177177
);
178178
} else {
179179
where = and(
180-
isNotNull(tagFoldersTable.parentFolderId),
180+
isNull(tagFoldersTable.parentFolderId),
181181
eq(tagFoldersTable.organizationId, parent.id),
182182
);
183183
}
@@ -191,13 +191,13 @@ Organization.implement({
191191
.where(
192192
and(
193193
eq(tagFoldersTable.id, cursor.id),
194-
isNotNull(tagFoldersTable.parentFolderId),
194+
isNull(tagFoldersTable.parentFolderId),
195195
eq(tagFoldersTable.name, cursor.name),
196196
eq(tagFoldersTable.organizationId, parent.id),
197197
),
198198
),
199199
),
200-
isNotNull(tagFoldersTable.parentFolderId),
200+
isNull(tagFoldersTable.parentFolderId),
201201
eq(tagFoldersTable.organizationId, parent.id),
202202
or(
203203
and(
@@ -209,7 +209,7 @@ Organization.implement({
209209
);
210210
} else {
211211
where = and(
212-
isNotNull(tagFoldersTable.parentFolderId),
212+
isNull(tagFoldersTable.parentFolderId),
213213
eq(tagFoldersTable.organizationId, parent.id),
214214
);
215215
}

0 commit comments

Comments
 (0)