Unify Data Sources with GraphQL at the edge

Rate this content
Bookmark

Combine multiple APIs and databases into a single centralized GraphQL API that you can enhance with auth, permissions and caching, fully managed and deployed to the edge with Wasm.

Jamie Barton
Jamie Barton
17 min
21 Sep, 2023

Comments

Sign in or register to post your comment.

Video Summary and Transcription

This Talk discusses the benefits of using GraphQL to unify data sources, the flexibility of deploying APIs with GraphBase, and the ability to customize the GraphQL API using TypeScript. The GraphBase SDK allows developers to import auth, config, connector, and schema, providing full type safety and configuration options. TypeScript provides a helpful coding experience with hover-over hints and descriptions. The Talk also highlights the ability to extend the Stripe API using custom code and the ease of configuration with GraphBase and TypeScript.

1. Unifying Data Sources with GraphQL

Short description:

Hey everyone, I'm Jamie. Today at TS Congress, I'll be discussing the topic of unifying data sources with GraphQL. Building a scalable and maintainable API involves considering various concerns and dealing with different APIs and SDKs. With the abundance of data sources, it can be time-consuming to integrate them all. However, the flexibility to create diverse applications using different data sources is a great benefit. The challenge lies in the lack of consistent documentation and the need to ensure data is available at the edge for optimal user experience.

Hey everyone, I'm Jamie. I'm really excited to be here today at TS Congress and I hope that you're all having a fantastic time. So far, there are so many amazing speakers and talks lined up. I'm really excited to check those out and catch up.

But obviously after this talk, we only have a few minutes together today really to go through some slides and a demo. So I think we should dive right into the topic that is unifying data sources with GraphQL.

Now if you're building an API, it doesn't matter if that API is REST or if that's GraphQL. It's pretty hard. Yes, it's easy to install a dependency, create some type definitions with GraphQL, and then create some resolvers and then deploy it. It's easy to do that. But there are so many other things to consider when building something scalable that you want to deploy to production, at the edge, hopefully, for your users to use and consume.

And this list that you see here is really only a small snapshot into some of the concerns that you have to kind of think about when building something scalable and maintainable in production. But I think the biggest problem today, it's a great benefit to have. But the biggest problem is that we have so many different data sources today that we all have to figure out how to use all of the APIs and SDKs. Well, they all differ as well. There's a different learning curve. There's different types of documentation. Some are more documented than others. Some take no time at all to get started and some take days to figure out. And because we're using so many of these services now to deliver our end products, well, it can often just be really time-consuming to do that.

I think the simplest to-do app that we all used to do and build when we first got started with something, I think in today's world, with all of these different data sources, I think there is so many different implementations of that now where maybe it's you create a to-do app that when you add a to-do, it sends you a notification via Slack or email or SMS. So there's three services. And then maybe it's when you add something or remove something or check something or uncheck something, maybe that goes on to find spots in your calendar that are free so you can actually find time to do these to-dos. So yeah, there are so many things to consider when building apps with all of these different data sources. And it's great that we've got this flexibility. But yeah, like I say, the downsides is some of these APIs have better documentation. Some of them don't. But the biggest thing, I think, with this is that all of the different services that we use today, they aren't really focused on where the data maybe lives because they know that they could just rely on someone using some caching or a static site generator or something. So most of these just deploy to a single region. But of course, if we want to use all of these different services, that data really should be at the edge closest to the user so that you can get the best experience when using your application that obviously you create using TypeScript.

2. Flexibility in API Deployment and Data Integration

Short description:

We are on a mission to solve the lack of flexibility in deploying APIs to different regions. At GraphBase, we allow developers to connect to any type of database and extend their applications with additional data sources. With our unified GraphQL API, you have full type safety on both the back end and front end. We provide tools to make this process easy and efficient.

And I think all of these APIs, they're deployed to a single region. And obviously you can pay to maybe deploy it to other regions. But I think that's just something that we all should have the flexibility to do and configure on our own. Because there are so many services that don't give you that flexibility when you really want it. And maybe if you are to get that from a service provider, they may charge you a lot more to do that. So that's the one thing that we are on a mission to solve at GraphBase.

And we allow developers to connect to any type of database, maybe a warehouse or a commerce application like Shopify. If you have a product in Shopify that you want to extend with more products or reviews. You might want to get those reviews from a different API. Maybe you have some content in HiGraph or Contentful or Sanity that you want to add to these product pages. Well, we give you the ability to kind of add data sources, extend them and add your own custom code and do other things. So we're on a mission to do that, to create a single GraphQL API that you can bring different data sources in with and then your different front ends as well. And with all of this, you have full type safety on the back end, full type safety on the front end with that unified GraphQL API. And there's so many cool tools to do that.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

From GraphQL Zero to GraphQL Hero with RedwoodJS
GraphQL Galaxy 2021GraphQL Galaxy 2021
32 min
From GraphQL Zero to GraphQL Hero with RedwoodJS
Top Content
We all love GraphQL, but it can be daunting to get a server up and running and keep your code organized, maintainable, and testable over the long term. No more! Come watch as I go from an empty directory to a fully fledged GraphQL API in minutes flat. Plus, see how easy it is to use and create directives to clean up your code even more. You're gonna love GraphQL even more once you make things Redwood Easy!
Local State and Server Cache: Finding a Balance
Vue.js London Live 2021Vue.js London Live 2021
24 min
Local State and Server Cache: Finding a Balance
Top Content
How many times did you implement the same flow in your application: check, if data is already fetched from the server, if yes - render the data, if not - fetch this data and then render it? I think I've done it more than ten times myself and I've seen the question about this flow more than fifty times. Unfortunately, our go-to state management library, Vuex, doesn't provide any solution for this.For GraphQL-based application, there was an alternative to use Apollo client that provided tools for working with the cache. But what if you use REST? Luckily, now we have a Vue alternative to a react-query library that provides a nice solution for working with server cache. In this talk, I will explain the distinction between local application state and local server cache and do some live coding to show how to work with the latter.
Nuxt on the Edge
Vue.js London 2023Vue.js London 2023
30 min
Nuxt on the Edge
Learn how to build a Vue application deployed to the edge to bring a blazing fast experience to your end users.
Batteries Included Reimagined - The Revival of GraphQL Yoga
GraphQL Galaxy 2021GraphQL Galaxy 2021
33 min
Batteries Included Reimagined - The Revival of GraphQL Yoga
The Guild has recently released Envelop - a new, modern GraphQL Server Framework and plugin system. In this talk I’ll share a brief overview of Envelop and why you should probably upgrade your existing GraphQL server to it.
Rock Solid React and GraphQL Apps for People in a Hurry
GraphQL Galaxy 2022GraphQL Galaxy 2022
29 min
Rock Solid React and GraphQL Apps for People in a Hurry
In this talk, we'll look at some of the modern options for building a full-stack React and GraphQL app with strong conventions and how this can be of enormous benefit to you and your team. We'll focus specifically on RedwoodJS, a full stack React framework that is often called 'Ruby on Rails for React'.

Workshops on related topic

Build with SvelteKit and GraphQL
GraphQL Galaxy 2021GraphQL Galaxy 2021
140 min
Build with SvelteKit and GraphQL
Top Content
Featured WorkshopFree
Scott Spence
Scott Spence
Have you ever thought about building something that doesn't require a lot of boilerplate with a tiny bundle size? In this workshop, Scott Spence will go from hello world to covering routing and using endpoints in SvelteKit. You'll set up a backend GraphQL API then use GraphQL queries with SvelteKit to display the GraphQL API data. You'll build a fast secure project that uses SvelteKit's features, then deploy it as a fully static site. This course is for the Svelte curious who haven't had extensive experience with SvelteKit and want a deeper understanding of how to use it in practical applications.

Table of contents:
- Kick-off and Svelte introduction
- Initialise frontend project
- Tour of the SvelteKit skeleton project
- Configure backend project
- Query Data with GraphQL
- Fetching data to the frontend with GraphQL
- Styling
- Svelte directives
- Routing in SvelteKit
- Endpoints in SvelteKit
- Deploying to Netlify
- Navigation
- Mutations in GraphCMS
- Sending GraphQL Mutations via SvelteKit
- Q&A
End-To-End Type Safety with React, GraphQL & Prisma
React Advanced Conference 2022React Advanced Conference 2022
95 min
End-To-End Type Safety with React, GraphQL & Prisma
Featured WorkshopFree
Sabin Adams
Sabin Adams
In this workshop, you will get a first-hand look at what end-to-end type safety is and why it is important. To accomplish this, you’ll be building a GraphQL API using modern, relevant tools which will be consumed by a React client.
Prerequisites: - Node.js installed on your machine (12.2.X / 14.X)- It is recommended (but not required) to use VS Code for the practical tasks- An IDE installed (VSCode recommended)- (Good to have)*A basic understanding of Node.js, React, and TypeScript
GraphQL for React Developers
GraphQL Galaxy 2022GraphQL Galaxy 2022
112 min
GraphQL for React Developers
Featured Workshop
Roy Derks
Roy Derks
There are many advantages to using GraphQL as a datasource for frontend development, compared to REST APIs. We developers in example need to write a lot of imperative code to retrieve data to display in our applications and handle state. With GraphQL you cannot only decrease the amount of code needed around data fetching and state-management you'll also get increased flexibility, better performance and most of all an improved developer experience. In this workshop you'll learn how GraphQL can improve your work as a frontend developer and how to handle GraphQL in your frontend React application.
Build a Headless WordPress App with Next.js and WPGraphQL
React Summit 2022React Summit 2022
173 min
Build a Headless WordPress App with Next.js and WPGraphQL
Top Content
WorkshopFree
Kellen Mace
Kellen Mace
In this workshop, you’ll learn how to build a Next.js app that uses Apollo Client to fetch data from a headless WordPress backend and use it to render the pages of your app. You’ll learn when you should consider a headless WordPress architecture, how to turn a WordPress backend into a GraphQL server, how to compose queries using the GraphiQL IDE, how to colocate GraphQL fragments with your components, and more.
Relational Database Modeling for GraphQL
GraphQL Galaxy 2020GraphQL Galaxy 2020
106 min
Relational Database Modeling for GraphQL
Top Content
WorkshopFree
Adron Hall
Adron Hall
In this workshop we'll dig deeper into data modeling. We'll start with a discussion about various database types and how they map to GraphQL. Once that groundwork is laid out, the focus will shift to specific types of databases and how to build data models that work best for GraphQL within various scenarios.
Table of contentsPart 1 - Hour 1      a. Relational Database Data Modeling      b. Comparing Relational and NoSQL Databases      c. GraphQL with the Database in mindPart 2 - Hour 2      a. Designing Relational Data Models      b. Relationship, Building MultijoinsTables      c. GraphQL & Relational Data Modeling Query Complexities
Prerequisites      a. Data modeling tool. The trainer will be using dbdiagram      b. Postgres, albeit no need to install this locally, as I'll be using a Postgres Dicker image, from Docker Hub for all examples      c. Hasura
Building GraphQL APIs on top of Ethereum with The Graph
GraphQL Galaxy 2021GraphQL Galaxy 2021
48 min
Building GraphQL APIs on top of Ethereum with The Graph
WorkshopFree
Nader Dabit
Nader Dabit
The Graph is an indexing protocol for querying networks like Ethereum, IPFS, and other blockchains. Anyone can build and publish open APIs, called subgraphs, making data easily accessible.

In this workshop you’ll learn how to build a subgraph that indexes NFT blockchain data from the Foundation smart contract. We’ll deploy the API, and learn how to perform queries to retrieve data using various types of data access patterns, implementing filters and sorting.

By the end of the workshop, you should understand how to build and deploy performant APIs to The Graph to index data from any smart contract deployed to Ethereum.