GraphQL Everywhere

Rate this content
Bookmark

There's an old guard of developers that try to convince you that GraphQL only belongs on the front-end. Join the resistance and see the true power of GraphQL as the ubiquitous and agnostic tool that it is for data normalization. From event-driven, serverless patterns, to low-code platforms, we'll talk about the why and how of freeing data access with GraphQL.

Jesse Martin
Jesse Martin
20 min
08 Dec, 2022

Comments

Sign in or register to post your comment.

Video Summary and Transcription

GraphQL is a preferred tool for solving the complex data access challenge in the current ecosystem. It allows merging diverse sets of data into a single API, reducing overhead and providing reusable patterns. GraphQL's purpose is to define data dependencies and it aligns with accessing complex data models and federated data dependencies. Hasura introduces the GraphQL data specification, a powerful tool for defining data needs and creating APIs. They are actively hiring and encourage users to try out their alpha release and provide feedback.

Available in Español: GraphQL en todas partes

1. Introduction to GraphQL and Hasura

Short description:

Hi, and welcome to my talk, GraphQL Everywhere. There will be a number of things to discuss or think about regarding GraphQL's usage. I am Developer Relations at Hasura, with a background in product and design. I'll provide a practitioner's take on what GraphQL has been and where it's going. Hasura is an open source tool that gives you GraphQL on your data sources, with robust access controls and a powerful predicate push-down model.

Hi, and welcome to my talk, GraphQL Everywhere. This is going to be a very fast talk. There are going to be a number of hot takes in here. And I think that at the end of this talk, we'll all have a number of things to discuss or think about or patterns that hopefully are maybe new to you or ones that will at least challenge some of the preconceived notions you've had about exactly where GraphQL might actually live.

Before we get into that, I want to go ahead and tell you about who I am. I am Developer Relations at Hasura. Hasura is a GraphQL company. I'll explain that here in a minute. I've been doing Developer Relations for GraphQL for roughly five years, and I come from a background in product and design. Some of my observations are going to be, as I described in the title, a practitioner's take on what GraphQL has been, where it's going, and mostly from a builder's mindset.

My name is Jesse Martin. I am a dad of four. That means that there will be a number of dad jokes dropped throughout this chat. I do apologize, but at this point I can't actually help that. You can also find me at MotleyDev. You'll see that Twitter handle there at the bottom of most of my slides. Who knows how long that's going to be good for. So definitely hop on that before that one's gone. But I want to go ahead and actually give you a quick overview of who Hasura is, the company I work for, because that'll give a little bit of context into where these observations and this pattern is coming from.

So first of all, Hasura is an open source tool, basically. And what it does is it gives you GraphQL on your data sources. It'll give us a database or a couple of other data sources at this point, and we'll actually generate the endpoints for you, the resolvers and things like that. Of course, you can customize them and all that kind of behavior. But at the core level, there is this idea of an engine that is interpreting one schema and conforming it or transforming it into another. That's actually going to be really important for us to have a look at later on. Think again Hasura Engine and also think again Hasura Open Source. I like to say, pay me if you want. And so what it does is it gives you very robust access controls, and we have a very powerful predicate push-down model. Basically the authorization takes place at fetching time, and so you're not actually over-fetching from your database. You're able to actually say, we want to have a very lean, very terse select set from our underlying data source.

2. GraphQL and Hiring

Short description:

And yeah, it supports custom business logic as well, event triggers, actions, and all those kind of behaviors you would expect from a data-layered tool. But the last point that I really want to hammer home, especially in times like these, is that we're hiring. So if you actually are in the market, if you're even dev rel, I want to talk to you. But we actually have a lot of openings across our business. And so we are hiring, definitely reach out if it's something of interest to you.

And yeah, it supports custom business logic as well, event triggers, actions, and all those kind of behaviors you would expect from a data-layered tool. But the last point that I really want to hammer home, especially in times like these, is that we're hiring. So if you actually are in the market, if you're even dev rel, I want to talk to you. But we actually have a lot of openings across our business. And so we are hiring, definitely reach out if it's something of interest to you.

So kind of where does this sort of sit in the big picture? Well, you'll kind of see it sitting in this sort of a layer where authorization, authentication happens externally. And you'll usually get a JWT is kind of the most common pattern. And then those roles get applied at fetch time. So like underneath it all what kind of happens is that you make a query, a GraphQL query, and our engine will actually map that to what the underlying data source understands. In this case, SQL, right? And so this is the way that our engine kind of operates at a fundamental level of letting you do this. This is a widget we have on our homepage. You can actually try it out interactively if you're curious, and there's a lot more information to be had on there. I did say it's open source, but this is not a side gig. So, I mean, it's a really big tool. We do have cloud versions, we have enterprise versions, we have a lot of major, major companies that are running on us. And so if you're looking for a GraphQL adoption at an enterprise-ready scale, reach out. We have a lot of interesting tools that might be of interest to you, and we have a really powerful go-to-market team that's just there to answer questions and get you going. So have a check.

OK, that's the Hasura stuff out of the way for now. And so what I really want to talk about next is that we have, for this talk, I have a couple of assumptions that are really, really important for you to actually bear in mind. Sorry, the benefit of recording from a home studio, right? So here are some assumptions that I want to have you really take with you into this talk, and that is that basically I am assuming that you will know a little bit about GraphQL and kind of what it's been used for up to this point. I really hope so because it's GraphQL conference and the other part of it that you need to be aware of is that some people on the internet get angry about really silly things. So those are the two primary points you need to understand to be able to go forward, and you'll see sort of what I mean by some of these later on. But first of all, so strong opinions loosely held but strongly inferred. I'm looping back to this practitioner's angle again. So these are things that I have seen in the market across multiple GraphQL companies. Now these are things that we have seen, but end of the day, haters gonna hate. So let's go ahead and start. So these are some of my opinions that have been formed from observing GraphQL at a number of different companies, both from the GraphQL provider as well as from the consumer. And that is that REST APIs are still very dominantly preferred by single service providers, people that actually are gonna be shipping an API for general consumption across the market.

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.
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'.
Step aside resolvers: a new approach to GraphQL execution
GraphQL Galaxy 2022GraphQL Galaxy 2022
16 min
Step aside resolvers: a new approach to GraphQL execution
Though GraphQL is declarative, resolvers operate field-by-field, layer-by-layer, often resulting in unnecessary work for your business logic even when using techniques such as DataLoader. In this talk, Benjie will introduce his vision for a new general-purpose GraphQL execution strategy whose holistic approach could lead to significant efficiency and scalability gains for all GraphQL APIs.

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.