Netlify Graph

Netlify Graph deprecation

As of May 1, 2023 this feature will no longer be supported for Netlify users. If you have enabled this feature, please disable and migrate off Netlify Graph before May 1, 2023. We recommend that you integrate directly to the service provider’s API instead of relying on the connection supported with Netlify Graph.

# Overview

Netlify Graph enables you to seamlessly integrate third-party APIs and services into web applications without writing API-specific code. Instead of connecting different APIs and SDKs with brittle code, you can abstract integrations behind a convenient GraphQL interface.

Essentially, Netlify handles the messy integration work so you can focus on solving other problems. Netlify Graph is available for all sites in your Netlify team.

Netlify Graph automatically deploys your site and generates a token

When you first visit the Graph page for your site, Netlify automatically generates a Netlify Graph token. This action triggers a site deploy and creates an entry in the Team audit log.

# Netlify Graph concepts

Netlify Graph uses some terminology that you may not be familiar with. Here's a list of definitions to help you understand the different pieces of Netlify Graph.

  • Graph Explorer: the part of the Netlify UI where you can connect to and authenticate APIs, then create GraphQL operations to use with those APIs.
  • Cloud sandbox: an isolated environment where you can test GraphQL operations without directly affecting your project.
  • Operation: a GraphQL operation, such as a query, mutation, subscription, or fragment.
  • Session: what the Netlify CLI uses to connect your cloud sandbox to your local project.
  • Handlers: auto-generated Netlify functions that wrap your GraphQL operations.

# GraphQL concepts

You use standard GraphQL queries, mutations, subscriptions, and fragments to interact with your Netlify Graph data.

# Get started with Netlify Graph

There are a lot of pieces to Netlify Graph, but you can build your knowledge by following these steps:

  1. Create a Graph Explorer cloud sandbox
  2. Connect an API or service
  3. Create queries
  4. Work locally
  5. Use an operation handler in your project

# Access secrets with Netlify Graph

You can access secrets for all of the APIs and services that you connect to Netlify Graph. Check out the Authentication docs for details.

# Netlify Graph and Next.js

If you are building a Next.js application, you can automatically generate Netlify Graph bindings by running the Netlify Graph commands inside your application folder.

Run commands in the root folder

Make sure to run the Netlify Graph commands in the root folder where your Next.js application is located. In the current CLI release, running in the root of the repository and not the application will result in an error.

# Disable Netlify Graph

Before disabling Netlify Graph, make sure to consider relevant data backups such as:

  • Saving any GraphQL operations you may want to refer to in the future. This includes operations such as queries, mutations, subscriptions, or fragments.
  • Saving Handlers for future reference. Handlers are auto-generated Netlify functions in your site's code that wrap the GraphQL operations.

You can disable Netlify Graph in Netlify Labs.

  1. In the Netlify UI, select the beaker icon (labeled Netlify Labs for screen readers).
  2. Under Experimental features, find Netlify Graph and select Disable.

# Add your service to Netlify Graph

You can become a Netlify Graph partner by adding your service to the Netlify Graph catalog. To do so, you need to meet the partner requirements. Contact us through the technology partner program for more information.

# Feedback

If you have thoughts to share and want to get in touch, fill out our survey.