Eliya Cohen

326 posts

Eliya Cohen

Eliya Cohen

@CoEliya

Software Developer | Creator of SafeQL (https://t.co/Q9Lm7Gow4O)

Israel Katılım Mart 2013
150 Takip Edilen131 Takipçiler
Eliya Cohen
Eliya Cohen@CoEliya·
@karlhorky @thdxr It was fundamentally changed since then (wsl2) I would recommend to give it another try. While I rarely work on Windows, when I do - it’s on wsl
English
1
0
0
35
Karl Horky
Karl Horky@karlhorky·
@CoEliya @thdxr Was considering setting up WSL for students since Oct 2019 (first issue in the repo), but IIRC it was the complexity / non-native interop, various different incompatible setups that kept us from going down that road github.com/upleveled/syst…
English
1
0
1
40
dax
dax@thdxr·
can someone describe to me the setup a power user would have on windows for their terminal? i cannot get a setup im happy with
English
48
0
55
22.8K
Eliya Cohen
Eliya Cohen@CoEliya·
@karlhorky Yes. Ideally it should add the ability to support helpers, fragments, custom annotations, and everything that is library-specific.
English
1
1
1
295
Eliya Cohen
Eliya Cohen@CoEliya·
Just published SafeQL v4 roadmap. Would love to hear your thoughts. Link below
Eliya Cohen tweet media
English
2
0
5
194
Eliya Cohen
Eliya Cohen@CoEliya·
@karlhorky There's always room for improvement in the json/jsonb saga, but V4 aims to be more pluggable, off-loading the work for other library maintainers who want to add a custom integration with SafeQL.
English
1
0
2
39
Karl Horky
Karl Horky@karlhorky·
@CoEliya Looking great, thanks for your continued effort here! 🚀 Do you think that better json / jsonb support will also be in v4? Or is that a bigger thing for later?
English
1
0
0
35
Eliya Cohen
Eliya Cohen@CoEliya·
@jamesacowling I tend to disagree here about SQL being inexpressive. In fact, it’s one of the most expressive language I’ve encountered. You’re right that it’s quite loose and unsafe, but not if you’re using proper tooling. This is one of the reasons I built SafeQL which is open source.
English
0
1
3
317
Eliya Cohen
Eliya Cohen@CoEliya·
@arktypeio Have you considered another API where it doesn’t throw an error in runtime when using something that can’t be translated to json schema? If I recall I wanted to use that but it sometimes threw an error when I used subtypes like email
English
0
0
0
66
ArkType
ArkType@arktypeio·
Need JSON Schema for your validator? Just call toJsonSchema- it's built-in to every type👍
ArkType tweet media
English
15
7
270
18.2K
Eliya Cohen
Eliya Cohen@CoEliya·
This can be adjusted or turned off. Visit the docs for more info #connections-inferliterals-optional" target="_blank" rel="nofollow noopener">safeql.dev/api/#connectio
English
0
0
0
89
Eliya Cohen
Eliya Cohen@CoEliya·
SafeQL 3.6.0 is now inferring string literals by default 🚀✨
English
1
2
6
513
Dominik 🔮
Dominik 🔮@TkDodo·
@housecor @AArdvarkErick It also co-locates queryKey and queryFn and will thus make getQueryData and setQueryData type-safe. Lately, I'm recommending to start with queryOptions abstractions and inline actual useQuery calls in the component. It works really well.
English
5
0
53
4.7K
Cory House
Cory House@housecor·
Tanstack Query pattern: 1. Colocate related queries and mutations 2. Centralize queryKeys If a query sets a key, and a mutation invalidates the same key, they probably belong in the same file. Example: This contains related queries and mutations and centralizes queryKeys.
Cory House tweet media
English
12
42
481
39.3K
Eliya Cohen
Eliya Cohen@CoEliya·
PG Query AST Explorer is now live
English
2
1
4
246
Dominik 🔮
Dominik 🔮@TkDodo·
I was a bit vague, so here is a better example. There's an obvious bug in here: When you're pending, you also have no data, so you'll render the empty screen right away with the spinner. The condition needs to be !data && !isPending. Gross. Also, all conditions we add in the future must check each branch. I've seen those components evolve into huge monsters a lot, but also this rather simple flow is already hard to grasp. It's not clear to me what actually gets rendered in each "state". Cognitive load is what matters (great read btw: github.com/zakirullin/cog…) So why did we add those conditions in the first place? Well, because they all share the div and the Heading and the Card with the same styles. If that becomes it's own layout component, things will be much easier to read, because we can then use early returns: We mostly don't care about the layouting jsx, it's boilerplate, so move it away from the logic. This version doesn't have the bug. Also notice how TypeScript now helps us with type inference. Because we have returned with !data, it now knows that data is defined afterwards. If it's easier to grap for the compiler (which is pretty smart), it's surely also easier for humans to understand.
Dominik 🔮 tweet mediaDominik 🔮 tweet media
Dominik 🔮@TkDodo

conditional renderings in react (no matter if you do them with && or with ? : null) don't evolve well. Like: { isPending && <Spinner /> } more conditions will follow, and you'll end up having a spinner where you don't want it. The solution is almost always component composition

English
28
26
508
93K