SShortSingh.
Back to feed

GraphQL vs REST: how field selection cuts over-fetching in a profile card

0
·3 views

The article compares GraphQL and REST by how much data each sends to fill a simple profile card showing a name and three post titles. A classic REST design returns whole resources with unused fields, which is over-fetching, while GraphQL lets the client select only the fields it needs. In a seeded lab test over 500 runs, plain REST sent about 21,400 bytes per card, while a trimmed REST call and a single GraphQL query each sent roughly 220 bytes. The author notes caveats: the test ran in one process without real network, compression, or a production GraphQL engine. Field selection shrinks responses, but the database reads only shrink if the resolvers are written to load less data.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Analysis of 58 one-star Shopify reviews finds EU merchants frustrated with invoice app compliance gaps

A developer built a Python scraper to pull pricing, star histograms, and merchant reviews from six Shopify apps serving EU invoicing, compliance, and theme cleanup needs. Analysis of 58 one- and two-star reviews showed European merchants, especially in Germany, the UK, and the Netherlands, made up nearly half of the severe complaints. Recurring problems included invoices being altered after cancellation, which conflicts with German GoBD rules, and credit notes being locked behind a $49 monthly plan despite EU legal requirements. Other complaints involved difficulty capturing buyer VAT IDs for Peppol e-invoicing and floating-point rounding errors on invoice totals. These findings led the developer to abandon a theme cleaner idea in favor of an invoicing tool built around immutable records and included credit notes.

0
ProgrammingDEV Community ·

Five static-site tools merged into one launch-check command, site-kit

The developer had built five small tools for launching static sites covering audits, legal pages, widgets, link pages and testimonials walls. After noticing they addressed one shared job, they merged them into a single package called site-kit. A launch-check command discovers each module's input in a site folder and runs the modules read-only, reporting SKIPPED for any module lacking input and READY only when at least one module runs clean. Stage one of the merge revealed a dispatcher bug where a random temporary path leaked into reports, making them non-reproducible; this was fixed with a fixed-name temporary folder and determinism tests. The repository includes a fictional demo site with clean and deliberately faulty versions to exercise each module.

0
ProgrammingDEV Community ·

Daywell's AI agent drafts new app integrations for human review

Daywell has built an AI agent that handles parent requests for integrations with apps it does not yet support. When a request arrives, the agent researches the app using only public pages and produces a one-page brief with sourced, unverified claims. It then drafts one of three outcomes: a new app connector, help steps for apps already readable, or a card for a connection that does not exist yet. A person reviews every draft before anything goes live. Only the app's name is kept, and any child or school names entered are discarded.

0
ProgrammingDEV Community ·

AnywayChat: Open-Source Chat Platform Aims to Make Communication Accessible to All

A developer has launched AnywayChat, an open-source, accessibility-focused communication project aimed at people who are blind, Deaf, non-speaking, or losing sight or hearing with age. The project seeks to unify different communication methods, including speech, text, sign language, and assistive technologies, within a single chat experience rather than fragmented tools. Its creator argues that technology should adapt to people instead of requiring people to adapt to it. The project is open to the global developer community, inviting developers, designers, accessibility advocates, and people with lived experience to test it, report issues, and contribute. A live application and a public GitHub repository are available for participation, and the creator describes the work as only the beginning.