Loading…
Topic
GraphQL
57 posts about GraphQL. Every summary links to the original.
- 57 posts
- 8 companies
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
Newest first
Posts
How We Built Hydrogen: A React Framework for Building Custom Storefronts
Hydrogen is a React framework for building custom Shopify storefronts, created to help merchants use the Storefront API without giving up capabilities associated with Liquid storefronts. Shopify built it around React Server Components and React 18’s streaming server-side rendering, using component-level data fetching, a preload cache to parallelize nested queries, and experimental loggers for query waterfalls and unused GraphQL properties. The framework evolved through more than 1,200 pull requests and 3,000 commits, with rigid components removed after feedback and nearly all exported GraphQL fragments eliminated to make queries more discoverable. The post reports that some demo store routes cut load time in half and that Hydrogen is used in production at Allbirds, Shopify Supply, Shopify Hardware, and Shopify, while future plans include a new router and incremental adoption from Liquid storefronts.
Introducing ShopifyQL: Our New Commerce Data Querying Language
Shopify introduces ShopifyQL, a commerce-focused querying language intended to make data exploration accessible to Shopify Plus merchants without data science or coding backgrounds. It addresses the limits of dashboards and reports, which show what happened but may not explain why, and simplifies access to modeled commerce datasets that would otherwise require SQL and data-lifecycle knowledge. Its syntax uses clauses such as FROM, SHOW or VISUALIZE, BY, WHERE, SINCE, UNTIL, ORDER BY, COMPARE TO, and LIMIT, with direct charting, commerce-specific date ranges, and planned native period comparisons. ShopifyQL is available through the ShopifyQL Notebooks first-party app, while GraphQL APIs let partners submit queries and receive results from the underlying datasets. Shopify says it will use the language across Shopify Admin analytics and plans features including more visualizations, pivoting, and aggregate conditions.
Logbook - 2022-06-01
Fly.io’s June 1, 2022 logbook records a week of platform, tooling, documentation, and dashboard changes, with forum community feedback driving several logged updates. The release adds rolling behavior to fly restart, extends fly status --all’s failed-VM visibility from two days to seven, supplies Laravel and Node.js examples, and introduces the first official Terraform provider with Machines API parity. Release commands receive 512MB of swap without increasing normal app RAM, while preview GraphQL endpoints fetch volumes, IPs, and certificates directly by ID to support Terraform imports and stateful tooling. Dashboard work adds Livebook upgrades, clearer billing and typography, individual Machine event tables, and fixes for IPv6 copying, organization-plan changes, cross-tab logout, billing URLs, misleading volume usage, and two-factor input limits.
Logbook - 2022-05-26
The May 26, 2022 changelog records product, reliability, documentation, and web UI changes made while work continued toward the Fly Machines launch. Users can configure proxy protocol v2 headers, while Fly HA Postgres instances become read-only and fail health checks at 90% volume usage, creating time to respond before full disks cause crashes. The GraphQL API now names missing apps directly, API telemetry is more selective, and fixes address certificate and volume deletion errors, region-code mutation, DNS validation context, and delayed organization invitations. Documentation covers the Machines API, its reference and FaaS usage, fly.toml updates, and PlanetScale Portals, while redesigned dashboards, app and organization pages, paid plans, documents, and app-level views update the web interface.
Logbook - 2022-05-05
Fly.io’s 2022-05-05 Logbook reports a broad set of infrastructure, product, security, documentation, and bug-fix updates intended to run customer apps faster and more reliably in VMs close to users worldwide. Remote builders now use regional Docker Hub mirrors, clean unused RUN --mount=type=cache build caches, and perform cleanup at startup and shutdown; the new behavior is default for new builders, while existing builders must be destroyed to receive it. WireGuard gateway improvements address load issues, add regional capacity, and support future redundancy, while another IAD gateway is intended to improve connectivity for customer 6pn networks and CI, especially GitHub Actions. The update also adds API security logging for SOC2, re-enables OpenTelemetry, speeds the proxy build pipeline, changes default persistent volume size from 10GB to 3GB, and ships a dashboard, payment retry feature, VSCode fly.toml validation and documentation changes, alongside GraphQL performance work and fixes for monitoring, invoices, encryption, and Homebrew updates.
Supabase Beta March 2022
Supabase announced several major platform updates for March 2022, introducing global edge deployments for JavaScript and TypeScript functions developed and tested locally. Database querying expanded to support GraphQL through an open-source, portable Postgres extension. Supabase Realtime received support for multiplayer and presence to enable collaborative applications, alongside enterprise and scale capabilities including Point-In-Time-Recovery, SLAs, premium support, a Prometheus endpoint, and an observability dashboard. To enhance security, an integration with GitHub secret scanning automatically notifies developers and rolls exposed service_role keys found in public repositories. Additional updates include the PostgREST 10 pre-release, Next-JS auth helpers, new OAuth providers, and full remote hiring across engineering, marketing, and human resources.
Leveraging Shopify’s API to Build the Latest Marketplace Kit
Marketplace Kit version 2 provides boilerplate app code and documentation for third-party developers integrating with Shopify, implementing selected commerce features, and launching marketplaces across channels. The team moved away from using the Shopify CLI-generated Node app because CLI changes could affect their code and documentation, while its dependencies limited control over development practices. The new kit separates a full-stack merchant-facing admin app from a buyer-facing client app, using Express, React, NextJS, GraphQL, Apollo Client, and Apollo Server; open-source versions are publicly available. Its examples demonstrate JWT authentication through App Bridge and Shopify’s Node API, serving REST and GraphQL together with Express, and choosing REST for a product-listing count where a query offered no advantage.
Hackathon: Bring the Func(🕺)
Following the conclusion of its fourth Launch Week, Supabase announced the ten-day community hackathon titled Bring the Func, running through April 10th. The competition highlights newly released platform capabilities, establishing primary prize tracks dedicated to Supabase Edge Functions and GraphQL projects powered by pg_graphql. Participants can compete individually or in teams of up to five people, provided all design and code assets are built during the event and published as open-source repositories. Submissions require linking a repository detailing architecture, hosted demos, and Supabase feature usage across storage, authentication, realtime, or database access layers. Alongside category prizes and community swag, Supabase partnered with the Future Forest Company to plant a tree and issue a certificate for every completed project entry.
GraphQL is now available in Supabase
Supabase announced the general availability of GraphQL support on its platform via pg_graphql, an open-source PostgreSQL extension that reflects SQL schemas into GraphQL types, fields, and relationships. Accessible through SQL functions or HTTP endpoints, the extension enforces PostgreSQL row-level security and filters introspection schemas according to the SQL roles assigned to request JWTs. To optimize performance, pg_graphql transpiles every GraphQL query into a single SQL query that aggregates results into JSON, avoiding the N+1 query problem and eliminating redundant join data payloads. Transpiled queries are cached as prepared statements to bypass planning overhead, and all generated mutations and queries support bulk operations. On Supabase Free Plan hardware, these optimizations achieve mean throughputs of 377.4 requests per second over the API and 656.2 queries per second over SQL connections.
Supabase Launch Week 4
Supabase announced the schedule and lineup for Launch Week 4, detailing daily product releases and events starting on March 28, 2022. The week initiated with Community Day to highlight community contributions and open-source tooling utilized across the platform. Technical additions across the week included the introduction of GraphQL data fetching for PostgreSQL databases, the rollout of Supabase Enterprise, and the launch of Edge Functions. Final announcements on April 1 revealed Supabrew alongside Supabase Realtime with multiplayer features, concluding with the start of a ten-day virtual hackathon running through April 9. For the hackathon, titled Bring the Func, Supabase partnered with the Future Forest Company to plant a tree for every submitted project on madewithsupabase.com.
Supabase Beta January 2022
Supabase announced product updates, platform improvements, and community resources released during January 2022. The platform expanded authentication options by adding Notion and LinkedIn OAuth support alongside Vonage and Textlocal SMS providers for one-time passwords. Observability tooling gained SQL querying capabilities for logs, timestamp filtering, and expanded time spans across project usage charts to accelerate issue diagnosis. Database infrastructure advanced with the release of pg_graphql version 0.1.0 introducing SQL Comment Directives, while PostgREST replaced pg_listen with built-in schema reloading and automated compute-based connection pool scaling. To streamline customer assistance, a priority selector was added to dashboard support forms with urgent tiers for paid projects.
Nerd Out on 10 of Our Favorite Posts From 2021
Shopify’s year-end roundup curates ten favorite engineering posts from 2021, spanning Ruby, storefronts, data analysis, databases, search, GraphQL, CI, APIs, and mobile development, while also noting several older reader favorites. The selection includes tutorials on building a web app with standard Ruby libraries, exploratory data analysis, GraphQL, Apache Beam for search, and React Native App Clips, alongside technical accounts of Hydrogen, YJIT, MySQL upgrades, and GraphQL rate limiting. YJIT was merged upstream and included in Ruby 3.1.0, while the CI team reduced the p95 of Shopify’s core monolith from 45 minutes to 18 minutes. The roundup also describes query-cost-based GraphQL rate limiting, rollback-testing roadblocks during a MySQL upgrade, and an App Clip effort that used a fail-fast, iterative approach.
Supabase Beta November 2021: Launch Week Recap
Supabase celebrated its third Launch Week and one year in beta by rolling out several major infrastructure and tooling updates. The company open-sourced its Dashboard for self-hosting and integrated Logflare to provide searchable database and API logs directly in the interface. For database querying and APIs, Supabase introduced a Postgres extension that resolves each GraphQL request with a single SQL statement to minimize network IO overhead, while upgrading its default hosted database to PostgreSQL 14 and deploying PostgREST 9.0. Security capabilities were expanded by enabling Row Level Security policies across the Realtime API to restrict streams and subscriptions on a per-user basis. Additional releases during the week included faster media file delivery, an open-sourced launch methodology, and a free course combining Next.js, Stripe, and Supabase.
Five more things
Supabase announced a series of platform updates, technical releases, and community initiatives to conclude its Launch Week. The team open-sourced pg_graphql, an in-progress PostgreSQL extension that keeps schema generation, query parsing, and resolvers natively on the database server. Supabase also enabled a global CDN spanning over 250 cities, delivering edge caching with a default one-hour cache time for storage assets alongside TLS 1.3, HTTP/3 over QUIC, and Brotli compression. While Supabase Functions is not yet released, two public RFCs were opened to explore architecture options, leaning heavily toward container-based execution. Finally, the update introduced a free SaaS development course with egghead.io and launched the ten-day Holiday Hackdays hackathon.
pg_graphql: A GraphQL extension for PostgreSQL
Supabase has open-sourced pg_graphql, a native PostgreSQL extension written in C and SQL that enables in-database GraphQL schema reflection and query resolution. Because free-tier virtual machines lacked memory headroom for standalone GraphQL processes like Hasura or Graphile, the team designed an in-engine solution to eliminate extra runtime overhead. The extension parses, validates, and transpiles incoming GraphQL operations into single SQL statements that aggregate data into JSON responses. This architecture avoids N+1 query problems, enforces existing row-level security policies, and maps GraphQL requests directly onto PostgreSQL transactions. The public SQL function can be queried directly or exposed over HTTP via PostgREST remote procedure calls.
Building an App Clip with React Native
The Shop team built an iOS App Clip to reduce the drop-off between a buyer’s checkout thank-you page and opening the full Shop app, where App Store download and onboarding added friction. App Clips are invoked through actions such as QR scans, links, or Smart App Banners and must stay below 10MB, while the team wanted React Native support for order tracking and related functionality. A Hello World build initially measured 28MB; explicitly selecting native dependencies in the Podfile reduced the baseline to 4.3MB, and a scrappy feature build reached 6.5MB. The team used early testing, invocation URL handling through React Native Linking, and shared data containers for app upgrades, ultimately releasing an App Clip at 9.1MB; extensive code sharing proved too complex and some code was copied.
Making Shopify’s Flagship App 20% Faster in 6 Weeks Using a Novel Caching Solution
Shop’s home feed, the app’s most used feature, aggregated orders from millions of Shopify and non-Shopify merchants plus tracking data from dozens of carriers, accounted for 30% of database load and affected application performance. Before each database update, the custom write-through cache marks a user’s cache invalid, applies the write, then refreshes and revalidates it. To handle concurrent updates, it uses a separate pending-writes key and a short-expiry key to distinguish active writes from interrupted processes, while Active Record Concerns preserve the existing ORM interface. After a staged validation rollout, the cache reduced database load by 15%, overall app latency by about 20%, and overall GraphQL latency by 20%, with a double-digit decrease in CPU usage.
Understanding GraphQL for Beginners–Part Three
Part Three of a beginner GraphQL series introduces mutations for creating, updating, and deleting database objects, extending the earlier focus on queries that fetch data. Using the existing Rails repository with Food and Nutrition ActiveRecord models, it shows how to generate mutation classes with rails g graphql:mutation and register root fields in mutation_type.rb. The tutorial defines input arguments, uses snake_case fields that GraphQL converts to camelCase, and implements a resolve method that creates or locates records and returns typed responses. It demonstrates foodCreate, foodUpdate, and foodDelete in GraphiQL, while exercises ask readers to build corresponding Nutrition mutations. It concludes that mutations use the same endpoint as queries and that each schema field has a resolve method that returns its response.
Understanding GraphQL for Beginners–Part One
The article introduces GraphQL as an open-source data query and manipulation language for APIs, contrasting it with REST's fixed response shapes and multiple endpoint calls. GraphQL lets clients describe exactly which fields they need, returning that requested structure through a single endpoint rather than a cookie-cutter response. Using a Toronto Eagles example, the article explains how one GraphQL query can combine requests for a team's founding year, captain's name, and last championship, avoiding three separate RESTful trips whose latency can vary. It also uses burger and bank withdrawal analogies to explain over-fetching, under-fetching, flexible frontend iteration, and fewer endpoints, then points readers to a forthcoming Ruby on Rails implementation in part two.
Understanding GraphQL for Beginners–Part Two
The second part of this beginner tutorial uses a food-focused Ruby on Rails application to show how GraphQL fields expose database data. It reviews the graphql directory, where mutations hold data-changing classes, types define returned structures, and food_app_schema.rb defines available queries. It distinguishes root fields, which are GraphQL entry points that define response structure, from object fields, which represent attributes, then demonstrates generating Food and Nutrition types and adding an all_food root field with a non-null list return type. Through GraphiQL at localhost:3000/graphiql, it runs selective queries, adds nutrition to food, and introduces an id argument for retrieving one record; requests pass through graphql_controller’s execute method and return JSON responses.
Related topics
All topics →Weekly digest
The best engineering reads, once a week.