REST Mapping
We are actively working to improve this documentation. The content you see here may be incomplete, subject to change, or may not fully reflect the current state of the feature. We appreciate your understanding as we continue to enhance our docs.
This section introduces REST mapping as a bridge layer that transforms any GraphQL endpoint into REST-style path-based routes, explaining how it enables REST API consumption without GraphQL clients or query syntax knowledge. It positions REST mapping as a strategy for gradual GraphQL adoption, supporting teams with existing REST infrastructure while maintaining GraphQL's benefits under the hood including schema validation, type safety, and unified data fetching.
REST Mapping Overview​
This document explains the REST mapping architecture built through GraphQLRestMapping and GraphQLRestMappingApiEndpoint, detailing how route definitions map to GraphQL queries, how path parameters and request bodies translate to GraphQL variables, and how responses are transformed from GraphQL's JSON format to simpler REST responses. It covers the benefits of REST mapping including simplified client integration, predictable URLs, and REST-familiar patterns while maintaining GraphQL's schema-driven approach.
REST Mapping Setup​
This guide walks through configuring REST mappings in the Brightspot CMS UI, including selecting a source GraphQL endpoint (GCA or custom), defining routes with HTTP methods and path patterns, mapping path parameters to GraphQL query variables, configuring request and response transformations, and testing mappings using the built-in REST mapping explorer. It provides examples of common REST API patterns and how to implement them as mappings over GCA endpoints.
REST Mapping Use Cases​
This document presents practical use cases for REST mapping including providing simplified public APIs for content delivery, supporting legacy systems that only understand REST, creating webhooks and integrations with third-party services, building mobile app backends with predictable endpoints, and phased GraphQL adoption where teams migrate from REST to GraphQL gradually. Each use case includes configuration examples and patterns for achieving REST-like behavior while leveraging GraphQL's capabilities.