Skip to content

Commit ce4e7fe

Browse files
committed
check type Error
1 parent d3d2701 commit ce4e7fe

File tree

1 file changed

+10
-15
lines changed

1 file changed

+10
-15
lines changed

test/graphql/types/Organization/creator.test.ts

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
11
import { eq } from "drizzle-orm";
2+
import type { Column, ColumnBaseConfig, ColumnDataType } from "drizzle-orm";
23
import type { FastifyInstance, FastifyReply } from "fastify";
34
import type { Client } from "minio";
45
import { beforeEach, describe, expect, it, vi } from "vitest";
5-
import type {
6-
ExplicitAuthenticationTokenPayload,
7-
} from "../../../../src/graphql/context";
6+
import type { ExplicitAuthenticationTokenPayload } from "../../../../src/graphql/context";
87
import { TalawaGraphQLError } from "../../../../src/utilities/TalawaGraphQLError";
9-
import type {
10-
Column,
11-
ColumnBaseConfig,
12-
ColumnDataType
13-
} from 'drizzle-orm';
148

159
interface CurrentClient {
1610
isAuthenticated: true;
@@ -219,15 +213,19 @@ const createMockContext = (overrides?: Partial<TestContext>): TestContext => ({
219213
});
220214

221215
type OrganizationFields = {
222-
organizationId: Column<ColumnBaseConfig<ColumnDataType, string>, object, object>;
216+
organizationId: Column<
217+
ColumnBaseConfig<ColumnDataType, string>,
218+
object,
219+
object
220+
>;
223221
};
224222

225223
type WhereOperators = {
226-
eq: typeof eq;
224+
eq: typeof eq;
227225
};
228226

229227
type UserFields = {
230-
id: Column<ColumnBaseConfig<ColumnDataType, string>, object, object>;
228+
id: Column<ColumnBaseConfig<ColumnDataType, string>, object, object>;
231229
};
232230

233231
const resolveCreator = async (
@@ -255,10 +253,7 @@ const resolveCreator = async (
255253
role: true,
256254
organizationId: true,
257255
},
258-
where: (
259-
fields: OrganizationFields,
260-
operators: WhereOperators,
261-
) => {
256+
where: (fields: OrganizationFields, operators: WhereOperators) => {
262257
return operators.eq(fields.organizationId, parent.id);
263258
},
264259
},

0 commit comments

Comments
 (0)