Wiki: GraphQL in HTML with Apollo Elements

For agents: Markdown version · Wiki index · Explore

Written by an LLM from machine transcripts. It can contain errors. Check the transcript before you quote it.

Summary

The speaker introduces a library designed to help developers build modern front-end applications using GraphQL and web components. The presentation highlights the benefits of using web standards, custom elements, and the Apollo Elements library for creating framework-agnostic UI components. Attendees learn how to combine queries and mutations with HTML, enabling them to write rich applications with minimal JavaScript.

Key points

  • 0:11 The speaker introduces web components as a standardized way to build advanced frontend components using HTML, CSS, and JavaScript.
  • 1:18 Web components are reusable, encapsulated, and fully interoperable across different frameworks and plain HTML environments.
  • 2:39 The speaker presents the Apollo Elements library, a TypeScript-based bridge between upstream Apollo GraphQL and web components.
  • 3:47 Code examples show how components built with Apollo Elements can be used seamlessly inside Angular, React, Vue, and plain HTML.
  • 5:01 The library also supports mutations, allowing developers to trigger data modifications directly from HTML inputs and buttons.
  • 6:27 Apollo Elements core controllers allow for composable and dry code, minimizing the amount of JavaScript required to build applications.
  • 7:34 The speaker concludes by suggesting that developers try Apollo Elements for building portals and dashboard single-page applications.

Takeaways

  • Use web components to build reusable UI elements that work across any frontend framework.
  • Leverage Apollo Elements to integrate GraphQL queries and mutations directly into HTML templates.
  • Reduce the amount of custom JavaScript in your frontend to improve application performance and maintainability.

Questions this talk answers

  • How can I use GraphQL without binding my frontend to a specific framework like React or Angular?
  • What is the best way to handle GraphQL queries and mutations inside standard HTML custom elements?
  • How do Apollo Elements help reduce the amount of JavaScript needed for data-driven applications?

Technologies

GraphQL, TypeScript, JavaScript, HTML, CSS, React, Angular, Vue, NPM

Tags

framework agnostic, frontend, graphql, javascript, typescript, web components