mikecaulley
mikecaulley on Hacker News
This doesn’t consider compute cost; the RAG model is much more efficient compared to infinite context length.
I’m curious to hear what are some of the most frustrating points developing with Django, React, and GraphQL.
Thanks for the great comment. I often see GraphQL get a bad rap in comments on this site but most of the time it seems to come from a misunderstanding of how to use it.
How you model the data at rest does not need to match the GraphQL specification. The GraphQL specification should be similar to your REST entities but they have traversable edges to other entities.
Of course, you are building something that is much more powerful. If you intend every possible GraphQL operation to perform perfectly, it'll take more development effort. Though if you optimize for only the most likely cases, the effort is not much greater.
Generally speaking, it's not more difficult than creating a REST API controller. Rather than mapping your service code to a controller, you map it to a (GraphQL) resolver. It feels extremely similar.
There are different things to look out for; like handling n+1 (https://shopify.engineering/solving-the-n-1-problem-for-grap...) queries, but nothing that I can say is too difficult.
I've found GraphQL to greatly improve the developer experience when building web apps. As a front-end developer you can easily get a full view of the data and relationships. Tools like GraphiQL make exploring APIs a pleasure. And regardless of what you need to present to the user on screen, you can quickly build a request that perfectly matches the data you need. There is also the nice addition of strict typing and there are libraries that automatically generate TypeScript types for you from the schema and/or your operations.
Let me look into what effort it would take to clean up the code and put it on Github. I'd be happy if it helped others starting a project. It heavily utilizes ReSwift and SnapKit, two libraries I wanted to gain some more experience with.
Posted by
mikecaulley on Sunday April 19, 2020 @01:26PM
from the show-hn dept.
Two weeks ago when walking around my neighborhood I noticed a strange amount of teddy bears placed in the windows of homes. When I got home I searched the internet and found https://www.nytimes.com/2020/04/03/style/teddy-bear-scavenge... describing that this was being done to provide additional entertainment for people going on walks during these times of social distancing.This past week I...