dion
dion
Explore posts from servers
DTDrizzle Team
Created by DiamondDragon on 3/30/2025 in #help
Buffer is not defined - drizzle-arktype
Alright i filed
7 replies
Aarktype
Created by dion on 4/5/2025 in #questions
Need help understanding this error
nice thanks!
7 replies
DTDrizzle Team
Created by DiamondDragon on 3/30/2025 in #help
Buffer is not defined - drizzle-arktype
Did u figure this out? getting the same issue here
7 replies
Aarktype
Created by dion on 4/5/2025 in #questions
Need help understanding this error
Think the exact cause is because of this:
this[]
this[]
Anyone know why this happens? Or is it a bug? Changing it to:
export const ApprovalConfigStepNodeValidator = type({
id: 'string.uuid',
name: 'string',
teams_that_can_approve: 'string.uuid[]',
description: 'string?',
conditions: ConditionValidator,
nextSteps: type('this').array().optional()
});
export const ApprovalConfigStepNodeValidator = type({
id: 'string.uuid',
name: 'string',
teams_that_can_approve: 'string.uuid[]',
description: 'string?',
conditions: ConditionValidator,
nextSteps: type('this').array().optional()
});
Resolves this issue. However, it's giving me back:
Type instantiation is excessively deep and possibly infinite.ts(2589)
Type instantiation is excessively deep and possibly infinite.ts(2589)
Error
7 replies
Aarktype
Created by dion on 4/5/2025 in #questions
Need help understanding this error
I have attatched the link to the playground here (It's too long)
7 replies
Aarktype
Created by dion on 4/5/2025 in #questions
Need help understanding this error
Ah didnt know i could do that. Here's the full schema:
export const ApprovalConfigStepNodeValidator = type({
id: 'string.uuid',
name: 'string',
teams_that_can_approve: 'string.uuid[]',
description: 'string?',
conditions: ConditionValidator,
nextSteps: 'this[]'
});
export type TApprovalConfigStepNode = typeof ApprovalConfigStepNodeValidator.infer;

export const ConditionValidator = type
.or(AtomicConditionSchema, CompositeConditionSchema)
.array()
.or('boolean');

const ConditionOperatorSchema = type.or(
"'eq'",
"'neq'",
"'gt'",
"'gte'",
"'lt'",
"'lte'",
"'like'",
"'nlike'",
"'ilike'",
"'nilike'",
"'in'",
"'nin'",
"'isnull'",
"'notnull'",
"'cs'",
"'cd'",
"'ov'",
"'fts'",
"'plfts'",
"'phfts'",
"'wfts'",
"'is'",
"'isnot'",
"'similar'",
"'nsimilar'",
"'between'",
"'nbetween'"
);
export const { AtomicConditionSchema, CompositeConditionSchema } = scope({
AtomicConditionSchema: {
field: 'string',
operator: ConditionOperatorSchema,
qualifiers: "('some' | 'every')?",
aggregation: "('count' | 'sum' | 'avg' | 'min' | 'max')?",
value: 'unknown'
},
CompositeConditionSchema: {
operator: "'or' | 'and'",
value: '(CompositeConditionSchema | AtomicConditionSchema)[]'
}
}).export();
export const ApprovalConfigStepNodeValidator = type({
id: 'string.uuid',
name: 'string',
teams_that_can_approve: 'string.uuid[]',
description: 'string?',
conditions: ConditionValidator,
nextSteps: 'this[]'
});
export type TApprovalConfigStepNode = typeof ApprovalConfigStepNodeValidator.infer;

export const ConditionValidator = type
.or(AtomicConditionSchema, CompositeConditionSchema)
.array()
.or('boolean');

const ConditionOperatorSchema = type.or(
"'eq'",
"'neq'",
"'gt'",
"'gte'",
"'lt'",
"'lte'",
"'like'",
"'nlike'",
"'ilike'",
"'nilike'",
"'in'",
"'nin'",
"'isnull'",
"'notnull'",
"'cs'",
"'cd'",
"'ov'",
"'fts'",
"'plfts'",
"'phfts'",
"'wfts'",
"'is'",
"'isnot'",
"'similar'",
"'nsimilar'",
"'between'",
"'nbetween'"
);
export const { AtomicConditionSchema, CompositeConditionSchema } = scope({
AtomicConditionSchema: {
field: 'string',
operator: ConditionOperatorSchema,
qualifiers: "('some' | 'every')?",
aggregation: "('count' | 'sum' | 'avg' | 'min' | 'max')?",
value: 'unknown'
},
CompositeConditionSchema: {
operator: "'or' | 'and'",
value: '(CompositeConditionSchema | AtomicConditionSchema)[]'
}
}).export();
There are not type errors in the above definition. Not sure if im defining the recursive structures correctly tho
7 replies
DTDrizzle Team
Created by dion on 6/26/2024 in #help
Possible bug with nested query + reverse access
JIC someone faces the same issue, this is a table length issue: https://github.com/drizzle-team/drizzle-orm/issues/2066
3 replies
DTDrizzle Team
Created by dion on 6/26/2024 in #help
Possible bug with nested query + reverse access
For more context, i have uploaded a summary of the schema and relationship
3 replies
DTDrizzle Team
Created by dion on 3/15/2024 in #help
drizzle-zod not infering jsonb type properly
Bump
2 replies
SSolidJS
Created by dion on 11/4/2023 in #support
hydration mismatch when wrapping component in a suspense
Hmmm, i think i might have caused a refetch because i click dismiss the error, however, do you know what might have caused the hydration error? @Toka
3 replies
SSolidJS
Created by dion on 11/4/2023 in #support
hydration mismatch when wrapping component in a suspense
bump
3 replies
SSolidJS
Created by dion on 11/4/2023 in #support
getting route parameters severside
Thanks, i'm using the first option u provided, and it works!
2 replies
SSolidJS
Created by dion on 11/2/2023 in #support
whats the use case of routeData and useRouteData
Thanks for the response! That gave me some insights! On that note, i’ve got some follow up questions: - How do we run useRouteData on the component level? Basically I break down my components that i use from a page into another folder, is it as simple as defining all the queries at the page level, then doing an import of the routeData in the component level, and selecting the resource which i need? - for createSeverData$, when there’s new data in the system, how do i trigger refetching of the data?
2 replies
TtRPC
Created by NeoBean on 8/20/2023 in #❓-help
Forward client headers with createTRPCProxyClient & Server-Side Helpers
did u find a solution for this?
8 replies
SSolidJS
Created by dion on 11/1/2023 in #support
Request data not consistent between createServerData$ and API route
Okay, it seems that the reason for this was because the client headers were not being forwarded over to the trpc endpoint if im understanding right. If that's the case, is there a way to forward headers in my context?
2 replies
SSolidJS
Created by dion on 10/31/2023 in #support
Unable to find modules
Damn, you’re absolutely right, how could i have missed this. Thank you so much.
3 replies
DTDrizzle Team
Created by dion on 9/26/2023 in #help
Class inheritance (Inherits keyword)
Gotcha, thanks for the insights. Ideally I would not want to edit the migration file since it's not very explicit. Would it then be possible to have a work-around to implement a "Class per table" inheritance as mentioned in this link? https://stackoverflow.com/questions/9174200/how-to-create-multiple-one-to-ones/9178524#9178524
7 replies
DTDrizzle Team
Created by hacktographer on 8/22/2023 in #help
Polymorphic Associations?
Hey! Still kind of confused as to how you create a polymorphic association in drizzle. Could you be kind enough to provide some code on your implementation? (i.e. changes you made to your schema.ts) That owuld help me alot. @hacktographer
29 replies