GraphQL Integration Tools and Strategies

  • The Guild offers a suite of open-source GraphQL tools that enhance code generation, inspection, and module management.
  • GraphQL Mesh enables querying non-GraphQL sources as if they were GraphQL, simplifying integration.
  • Schema Stitching is a viable alternative to Apollo Federation for merging GraphQL sources.
  • Implementing GraphQL gradually, starting from the client side, can ease adoption and learning.
  • A registry like GraphQL Hive facilitates the management of distributed schemas without centralization.

In the world of software development, integrating new technologies into existing systems can be a daunting task. GraphQL, with its powerful capabilities, offers a solution that can streamline data queries and enhance flexibility. However, its potential is best realized through a gradual and distributed approach, allowing teams to adopt it at their own pace and as per their specific needs.

The Guild has been instrumental in providing a suite of open-source tools designed to make GraphQL more accessible and efficient. These tools include the GraphQL Code Generator, which helps automate the generation of code from schemas and operations, and GraphQL Inspector, which tracks changes to prevent breaking changes. Additionally, GraphQL Modules allows for dividing responsibilities within a GraphQL gateway among different teams. These tools are built to be used individually, allowing for a slow and steady integration into existing systems.

GraphQL Mesh stands out as a revolutionary tool that allows developers to query non-GraphQL sources as though they were GraphQL. This means that existing REST, SOAP, gRPC, and other data sources can be seamlessly integrated into a GraphQL system. By converting existing schemas into GraphQL schemas, GraphQL Mesh reduces the friction of adopting GraphQL, making it an excellent choice for teams looking to leverage GraphQL's benefits without overhauling their entire architecture.

When it comes to merging multiple GraphQL data sources, Schema Stitching presents a robust alternative to Apollo Federation. While Apollo Federation has its advantages, Schema Stitching provides a more flexible solution, particularly for those who do not wish to commit to a single ecosystem. By maintaining and evolving Schema Stitching, it continues to be a powerful option for integrating GraphQL sources.

One of the most effective strategies for integrating GraphQL is starting from the client side. Many clients currently rely on REST, performing multiple calls and manually restructuring data for the UI. By introducing GraphQL to the client, teams can automate much of this process, easing the learning curve and allowing for incremental adoption. Once comfortable, the orchestration can gradually be moved to the server to maximize benefits.

Despite the move towards GraphQL, existing data sources remain in use, often still utilizing REST endpoints. GraphQL Mesh allows these sources to be queried in GraphQL, either by converting them into GraphQL schemas or by creating SDKs that can query directly. This flexibility ensures that teams can continue to use their existing services while also benefiting from GraphQL's capabilities.

Managing these distributed GraphQL services requires a strategy that avoids creating a single point of failure. This is where the concept of a registry like GraphQL Hive comes into play. By storing and managing schemas in a registry, teams can maintain a centralized view of their data graph without having to centralize their execution. This registry can be used to generate SDKs, enforce best practices, and visualize data, all while allowing for distributed execution.

In summary, the key to successful GraphQL integration lies in adopting a gradual approach that leverages existing tools and data sources. By starting small and expanding as needed, teams can harness GraphQL's power without disrupting their current systems. The tools provided by The Guild, such as GraphQL Mesh and Schema Stitching, enable this flexibility, allowing teams to choose their path and implement GraphQL in a way that best suits their needs.

Watch full talk with demos and examples:

Rate this content
Bookmark

From Author:

During our work with many different clients from all shapes and sizes, The Guild had to come up with all kinds of innovative solutions to help customers achieve the most out of GraphQL and help adopt it more easily. During that talk I will mention how you could use GraphQL in places you though it wasn’t possible, share open source tools to help you and provide new perspectives about why GraphQL is a great technology.

This talk has been presented at GraphQL Galaxy 2020, check out the latest edition of this Tech Conference.

Watch video on a separate page

FAQ

Uli is a member of The Guild, the largest open source group in the GraphQL world. He gave the first talk at GraphQL Galaxy.

The Guild is the largest open source group in the GraphQL community, responsible for maintaining popular libraries like GraphQL Code Generator, GraphQL Inspector, GraphQL Modules, GraphQL Tools, and GraphQL Mesh.

The Guild provides several tools including GraphQL Code Generator, GraphQL Inspector, GraphQL Modules, GraphQL Tools, and GraphQL Mesh, among others.

The Guild believes in a gradual and distributed approach to adopting GraphQL. They emphasize using tools and solutions only when needed and ensuring that these tools can be integrated gradually without a complete buy-in to a specific ecosystem.

You can contribute to The Guild's projects by visiting their GitHub repositories, joining their forum, or participating in their online chat. They welcome community feedback and contributions to improve their open-source projects.

GraphQL Hive is a registry for different GraphQL schemas and sources. It helps in organizing and managing schemas from various sources and is used to generate SDKs for distributed query execution.

Apollo Federation is a technique to merge multiple GraphQL sources into one, but The Guild maintains and improves Schema Stitching as an alternative. Schema Stitching allows merging GraphQL sources and non-GraphQL sources, providing flexibility and customization options.

Yes, GraphQL Mesh allows you to specify custom sources and create custom transforms, giving you full control over the conversion, execution, and merging processes.

GraphQL Mesh allows you to query sources that are not GraphQL as if they were GraphQL automatically. It can convert various data sources like OpenAPI, gRPC, SOAP, SQL, and OData into GraphQL schemas.

The Guild has joined the GraphQL Foundation to help influence and contribute to the core assets of GraphQL, such as GraphQLJS and GraphQL.org. They are involved in migrating GraphQLJS to TypeScript and improving the GraphQL.org infrastructure.

Uri Goldshtein
Uri Goldshtein
34 min
02 Jul, 2021

Comments

Sign in or register to post your comment.
Video Summary and Transcription
The talk covers the journey of The Guild, the largest open-source group in the GraphQL world, highlighting their contributions and tools like GraphQL Code Generator, GraphQL Inspector, and GraphQL Mesh. GraphQL Mesh allows converting non-GraphQL sources such as OpenAPI, Swagger, and SQL into GraphQL, making it easier to query these sources. Schema Stitching is discussed as a flexible alternative to Apollo Federation, enabling the merging of multiple GraphQL schemas. The talk also mentions GraphQL Web Socket library for integrating subscriptions, and GraphQL Helix for lightweight framework needs. The Guild's contributions to the GraphQL Foundation, including migrating GraphQLJS to TypeScript and rebuilding GraphQL.org using Gatsby, are highlighted. GraphQL Hive is introduced as a registry to manage different GraphQL schemas, promoting a distributed approach to GraphQL integration without a central gateway.

1. Introduction to The Guild and Its Tools

Hi everyone, my name is Uli and I'm really excited to be here and give the first talk at GraphQL Galaxy. I'm a member of a group called The Guild. We're the largest open source group in the GraphQL world. We have developed various tools like the GraphQL Code Generator, GraphQL Inspector, GraphQL Modules, GraphQL Tools, and GraphQL Mesh. These tools help in generating code, tracking changes, splitting responsibilities, and querying non-GraphQL sources.

2. GraphQL Foundation and Contributions

In the last year, we joined the GraphQL Foundation to influence and contribute to GraphQLJS and GraphQL.org. We're migrating GraphQLJS to TypeScript and need help with that. We've rebuilt GraphQL.org using Gatsby, making it easier to contribute and find well-maintained libraries. It's now easier than ever to contribute.

QnA

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
Tom Pressenwurter introduces Redwood.js, a full stack app framework for building GraphQL APIs easily and maintainably. He demonstrates a Redwood.js application with a React-based front end and a Node.js API. Redwood.js offers a simplified folder structure and schema for organizing the application. It provides easy data manipulation and CRUD operations through GraphQL functions. Redwood.js allows for easy implementation of new queries and directives, including authentication and limiting access to data. It is a stable and production-ready framework that integrates well with other front-end technologies.
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
This Talk discusses handling local state in software development, particularly when dealing with asynchronous behavior and API requests. It explores the challenges of managing global state and the need for actions when handling server data. The Talk also highlights the issue of fetching data not in Vuex and the challenges of keeping data up-to-date in Vuex. It mentions alternative tools like Apollo Client and React Query for handling local state. The Talk concludes with a discussion on GitLab going public and the celebration that followed.
Batteries Included Reimagined - The Revival of GraphQL Yoga
GraphQL Galaxy 2021GraphQL Galaxy 2021
33 min
Batteries Included Reimagined - The Revival of GraphQL Yoga
Envelope is a powerful GraphQL plugin system that simplifies server development and allows for powerful plugin integration. It provides conformity for large corporations with multiple GraphQL servers and can be used with various frameworks. Envelope acts as the Babel of GraphQL, allowing the use of non-spec features. The Guild offers GraphQL Hive, a service similar to Apollo Studio, and encourages collaboration with other frameworks and languages.
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
The Talk discusses the challenges and advancements in using GraphQL and React together. It introduces RedwoodJS, a framework that simplifies frontend-backend integration and provides features like code generation, scaffolding, and authentication. The Talk demonstrates how to set up a Redwood project, generate layouts and models, and perform CRUD operations. Redwood automates many GraphQL parts and provides an easy way for developers to get started with GraphQL. It also highlights the benefits of Redwood and suggests checking out RedwoodJS.com for more information.
Adopting GraphQL in an Enterprise
GraphQL Galaxy 2021GraphQL Galaxy 2021
32 min
Adopting GraphQL in an Enterprise
Today's Talk is about adopting GraphQL in an enterprise. It discusses the challenges of using REST APIs and the benefits of GraphQL. The Talk explores different approaches to adopting GraphQL, including coexistence with REST APIs. It emphasizes the power of GraphQL and provides tips for successful adoption. Overall, the Talk highlights the advantages of GraphQL in terms of efficiency, collaboration, and control over APIs.
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
GraphQL has made a huge impact in the way we build client applications, websites, and mobile apps. Despite the dominance of resolvers, the GraphQL specification does not mandate their use. Introducing Graphast, a new project that compiles GraphQL operations into execution and output plans, providing advanced optimizations. In GraphFast, instead of resolvers, we have plan resolvers that deal with future data. Graphfast plan resolvers are short and efficient, supporting all features of modern GraphQL.

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
Build Modern Applications Using GraphQL and Javascript
Node Congress 2024Node Congress 2024
152 min
Build Modern Applications Using GraphQL and Javascript
Featured Workshop
Emanuel Scirlet
Miguel Henriques
2 authors
Come and learn how you can supercharge your modern and secure applications using GraphQL and Javascript. In this workshop we will build a GraphQL API and we will demonstrate the benefits of the query language for APIs and what use cases that are fit for it. Basic Javascript knowledge required.
End-To-End Type Safety with React, GraphQL & Prisma
React Advanced 2022React Advanced 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