Documentation

TutorialHow-To GuidesReferenceConceptual Guides

v3 Docsv2 Docsv1 Docs
Sign Up for Free

Functions

Functions let you build dynamic applications without running servers. Submit forms, authenticate users, securely connect to external services, build GraphQL/REST APIs, and more.

Functions are a simpler way to build APIs for your Gatsby site as you develop, test, and deploy them alongside your frontend code. Managed Serverless infrastructure means simple operations and effortless scaling.

Deploying Serverless Functions on Gatsby

Running serverless functions on Gatsby Cloud is as easy as deploying your Gatsby project. Read more about deploying on Gatsby Cloud.

All serverless functions are served on the route of the build that they are built with including preview urls, build urls, and production urls on Hosting.

Functions are generally available in sites running Gatsby 3.7 and above.

Getting Started

Get started writing Functions

Routing

Functions support simple and dynamic routing to cover any use case

Middleware & Helpers

Functions ships with built-in middleware and helpers and can be extended

© 2022 Gatsby, Inc.