The Secret to Graph Onboarding

Rate this content
Bookmark

"What is GraphQL used for?” “How do I find the fields I need?” “How do I test queries against a local graph?” All of these are common and valid questions that developers who are learning GraphQL have when they are first getting started with a unified graph. The secret to overcoming these challenges? You guessed it, Apollo Studio! In this session, we’ll dive into the best tools in Apollo Studio to help new (and experienced) developers feel confident when querying and collaborating on a unified graph

Danielle Man
Danielle Man
24 min
10 Dec, 2021

Comments

Sign in or register to post your comment.

Video Summary and Transcription

Today's Talk focused on making GraphQL graphs more usable and approachable. It covered topics such as onboarding developers, enforcing graph usage, handling errors and authentication, creating a custom developer portal, enhancing the log-in button and query IDE experience, enforcing rules, and building and customizing public graphs.

1. Introduction to Making Your Graph More Usable

Short description:

Hey, everyone! Today, I want to share tips for setting up your graph to be more usable to other people. GraphQL's introspection and auto-generated tools make it self-documenting, but as your graph grows, you'll need to scale development and onboard new users. Thinking about graph usability from the start makes onboarding easier.

Hey, everyone! My name is Danielle and I'm an engineering director at Apollo where I've been working on helping people use graphs for more than five years now. And today, I want to share some tips with you for how to set your graph up so other people can use it successfully.

This talk will be a little different than your standard GraphQL deep dive because instead of talking about some of the elements that go into building a graph, I would like to talk about how people use graphs. And in particular, I would like to talk about how to make your graph more usable to other people.

You might wonder, why is it important to take explicit steps towards making your graph more usable? Well, GraphQL has introspection built into its specification, so it's self-documenting, right? And the GraphQL ecosystem has a lot of wonderful tools that are auto-generated from GraphQL introspection to make things like schema diagrams and fast documentation sites. But the reality is, like any other piece of code that you author or any other product that has a bit of success, eventually it will start growing and growing. And you're going to need to scale the velocity of your graphs development beyond a single person or a single team of people. And the more you think about how you want to use your graph early on, the easier it will be to onboard new folks into your graph down the road.

2. Onboarding Developers and Enforcing Graph Usage

Short description:

Today, we'll discuss how to onboard developers into large-scale graphs and create a developer portal-like experience for easy integration. We'll also explore tooling to enforce graph usage and establish naming conventions. Additionally, we'll cover schema and query linting tools for federated graphs and the benefits of capturing metadata using GraphQL directives.

So with our time today, I want to talk first about how people who are running graphs at a pretty large scale are onboarding developers into their graphs both to consume and to contribute to. And then with the majority of our time, I want to write some code together and show you how you can set your graph up with a developer portal like experience for other people to plug into with very little effort. So let's dive in.

I feel like the GraphQL community is inundated with technical content relating to how to scale a graph. But I haven't seen a lot of content around the human side of scaling a graph. So I asked some of our customers and some folks from our community, what do you do to onboard new people to your graph? And I got a lot of answers back with overlap. So it was exciting to see a lot of the patterns and what people were doing.

A lot of folks are using internal hashtag GraphQL Slack channels to make themselves available for questions and to create processes around things like schema design. A lot of folks host regular onboarding sessions to help new teams get started. Folks also host monthly lunch and learn sessions and brown bag talks on advanced GraphQL topics or to talk about new things that are happening in the ecosystem. And a lot of folks have set up a graph section in their internal wikis. Some folks have even created full graph websites. And these sites tell people how to get started with a graph, how to authenticate with every company's unique needs, what types of conventions this graph is following, et cetera.

Some of my favorite answers that I got back though were actually around the tooling that people have set up to enforce that their graph is being used according to the rules of the company. One example is that there are a lot of ways that people set up observability for their APIs. And with GraphQL, once you put something into a graph, it becomes discoverable through introspection. So it's very possible that you might add a field to your schema for your own use, but someone else in some other department might also start using it. So if you require that every request being made to your graph has headers to identify which client was making those requests, then you can set up observability to be alerted whenever a new client starts using your field, which becomes really useful information as you evolve a graph. And what I have on this slide here is just an example of what that client-level observability looks like in Apollo Studio.

Another pattern that I really liked was the idea that you could establish some naming conventions for your operations. So first and foremost, one thing that you can do is you can enforce that every operation to your server has a name, but then in addition to that, you can set up naming conventions so that your operations are all being named in a standardized way. And this becomes really useful down the road because inevitably one day, you'll end up having some issue with some section of your graph, and if all of your operations follow a standard naming convention, it will be very easy to figure out which parts of your products are being affected by this graph issue. So even though operation names aren't unique identifiers, in practice they're actually very, very helpful as a tool for product resiliency.

And then on the developer tooling side of things, there was a pattern of people setting up schema and query linting tools that I really liked. So one example of this is in a federated graph where you have lots of subgraphs that are all independently owned and controlled by different teams, it can often be really useful to enforce that every subgraph schema has contact information in the schema itself. And you can use GraphQL directives to define contact information. And then you can use schema linting and GraphQL schema tools to make sure that those directives are present. And one of the cool things about using the schema and directives and linting for capturing all of that metadata is that all of the tools further down in the GraphQL ecosystem can make use of that metadata as well. So here in the screenshot I have a picture of the documentation page like schema documentation for graph in studio that is showing contact information about the subgraph that a particular field belongs to. And there's so many more conventions that you could set up along these same lines.

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.