Matthew Krick

250 posts

Matthew Krick banner
Matthew Krick

Matthew Krick

@mattkrick

Technical Co-Founder, Principal Engineer ❤️ Open source 🤓 AI, GraphQL, NodeJS, React 🏋️‍♂️ Fitness

San Diego, CA Katılım Nisan 2009
665 Takip Edilen455 Takipçiler
Sabitlenmiş Tweet
Matthew Krick
Matthew Krick@mattkrick·
Unpopular opinion: GraphQL has no business knowing what HTTP is. Doesn't matter if it travels via http, sse, websocket, webrtc, or carrier pigeon. It's the WHAT not the HOW.
English
12
12
116
0
Matthew Krick
Matthew Krick@mattkrick·
@jasonbahl @chrisgrabinski @moon_meister @nextjs I believe layouts must be deterministic at build time, not SSR time. I assume that’s how they’ve managed to relax the global asset constraint & you can do things like import external css files in it. Still wrapping my head around v13 though. seems… complex
English
1
0
5
0
JSON Bahl
JSON Bahl@jasonbahl·
@chrisgrabinski @moon_meister @nextjs But then I want Next to then be able to do the cool stuff it does with Layouts like fetching the navigation/sidebar/content all in separate, queries...And for all pages that share the main layout, the nav doesn't need to be re-fetched, etc.
English
1
0
0
0
JSON Bahl
JSON Bahl@jasonbahl·
With the new @nextjs Layouts, is it possible to fetch something from an API, then depending on the response, decide which Layout to load? Or is it only possible to determine the layout based on url/path/segments?
English
3
1
3
0
Matthew Krick
Matthew Krick@mattkrick·
@Lane8music can’t sleep. Where’s that brightest lights remix from tonight??
English
0
0
0
0
Matthew Krick
Matthew Krick@mattkrick·
@sseraphini - If you're open source, PRing the codebase should be the final step before hiring 😉 - Onboarding checklist in @NotionHQ for the first 2 weeks. - Welcome video & code walkthroughs in @loom - 1:1 sync time with team members. There's still no substitute for human connection
English
0
1
2
0
Sibelius Seraphini
Sibelius Seraphini@sseraphini·
How to onboard developers without meetings?
English
7
1
11
0
Matthew Krick
Matthew Krick@mattkrick·
@simon_prickett Thank you Simon! Really appreciate your work making redis more accessible to everyone!
English
0
0
1
0
Matthew Krick retweetledi
josh ackerman
josh ackerman@joshuaackerman·
i have thought about this hacker news comment nearly every day since november ninth twenty seventeen
josh ackerman tweet media
English
468
28.4K
135.6K
0
Matthew Krick
Matthew Krick@mattkrick·
@jmhodges 💯GraphQL was meant to replace REST, not SQL. The current trend of generating graphql queries from a sql schema doesn’t scale.
English
1
0
6
0
Jeff Hodges
Jeff Hodges@jmhodges·
GraphQL makes your public API equal to a generic database and -- worse -- a generic graph database. The amount of maintenance work is sky high. Locking the query capabilities down means you're just doing normal APIs but not locking it down means infinite performance work
English
27
47
459
0
Jeff Hodges
Jeff Hodges@jmhodges·
GraphQL is a trap
English
110
367
3.2K
0
Matthew Krick
Matthew Krick@mattkrick·
@michlbrmly @n1rual @notrab @GraphQL @graphqlwtf oh that's cool! i imagine you could unjoin, merge, & cache the response across a few dataloaders, too... do you have an ORM between graphql and your database? i.e. how does it know to fetch some fields from postgres & others from redis?
English
1
0
0
0
Michael Bromley
Michael Bromley@michlbrmly·
@mattkrick @n1rual @notrab @GraphQL @graphqlwtf In my implementation this would translate into a single SQL query on the user table, joining order and then joining user. By default I limit nested joins to 3 levels, and after that things revert back to n+1 field resolvers. In practice it seems like a pragmatic compromise.
English
1
0
1
0
Jamie Barton 🥕
Jamie Barton 🥕@notrab·
Who’s using DataLoader with @GraphQL? 🙋 It’s taken a few attempts to get this video done, but Monday’s @graphqlwtf episode will show how you can batch requests, and remove unnecessary calls to your database.
English
3
2
23
0
Matthew Krick
Matthew Krick@mattkrick·
@sseraphini license your client work as MIT & host it on a $5 droplet after they pay
English
0
1
2
0
Sibelius Seraphini
Sibelius Seraphini@sseraphini·
How to transition from a software house to a startup?
English
5
2
13
0
Kim Maida
Kim Maida@KimMaida·
I dare you to demonstrate how old you are in "developer years" in one sentence without stating any actual years
English
4.4K
133
1.8K
0
Matthew Krick
Matthew Krick@mattkrick·
@Steve8708 @builderio So Map is faster than Obj until I read 22x more than I write. ... not that I'm prematurely optimizing or anything 😅
Matthew Krick tweet media
English
2
0
3
0
Steve (Builder.io)
Steve (Builder.io)@Steve8708·
So while you may not need this everywhere, some use cases that involve rapid updates and might benefit from this opt: - frameworks - gaming - animations using RAF - rendering like Figma or @builderio - spreadsheets - hardcore perf enthusiasts 😄 Any others I'm not thinking of?
English
2
1
39
0
Steve (Builder.io)
Steve (Builder.io)@Steve8708·
Performance tip: if you need to set a lot of dynamic keys to an object, a Map can give you better perf Explanation in 🧵:
Steve (Builder.io) tweet media
English
27
533
2.9K
0
Matthew Krick
Matthew Krick@mattkrick·
@Dopamine_Driven that sounds like a solid authentication approach! How do you handle things like, e.g. a mutation inviteToTeam(teamId) where you want to make sure the viewer has permissions to call that based on the teamId passed in as a variable?
English
1
0
1
0
Andrew Ross
Andrew Ross@Dopamine_Driven·
@mattkrick Private Services using a class based dependency injection flow like Nestjs Then you can sync up the global context with the presence of an Authorization header, parse the JWT and decode completely to snag user ID, consume those in resolvers and as a way to verify auth status
English
1
0
2
0
Matthew Krick
Matthew Krick@mattkrick·
GraphQL folks, how do you keep authorization out of your resolvers? GraphQL Shield? graphql-tools resolver composition? custom directives? Show me the way!
English
8
3
13
0
Matthew Krick
Matthew Krick@mattkrick·
@jasonbahl Ah good distinction. I'm talking about operation-specific and type-specific authorization. e.g. Who gets to call the "inviteToTeam" mutation?
English
0
0
1
0
JSON Bahl
JSON Bahl@jasonbahl·
@mattkrick Similar to your opinion here, I kinda think GraphQL shouldn’t know what Authorization is. Other layers of the stack should, and GraphQL should resolve to those layers. 🤷‍♂️ A lot of these tools tie business logic to the GraphQL Schema. I think it should be a lower level.
Matthew Krick@mattkrick

Unpopular opinion: GraphQL has no business knowing what HTTP is. Doesn't matter if it travels via http, sse, websocket, webrtc, or carrier pigeon. It's the WHAT not the HOW.

English
1
0
1
0
Matthew Krick
Matthew Krick@mattkrick·
@n1rual @shinzui Tell me more! I use graphql-jit to squeeze out every little bit of performance 😅 I've stayed away from graphql-middleware for that very reason, but what about new node versions has reduced the impact?
English
1
0
0
0
Laurin Quast
Laurin Quast@n1rual·
@mattkrick @shinzui Let us know if you have some more questions 😇 GraphQL Shield uses graphql-middleware which can have a huge impact on high traffic servers as it wraps all resolver functions instead of only affected ones. But that impact should be smaller on recent Node.js versions!
English
2
0
2
0
Nadeem Bitar
Nadeem Bitar@shinzui·
@mattkrick We use graphql-shield which works well. graphql-authz looks good also.
English
1
0
4
0