{"@context":"https://schema.org","@graph":[{"@type":"WebPage","@id":"https://inquir.org/use-cases/rest-api-endpoints#webpage","url":"https://inquir.org/use-cases/rest-api-endpoints","name":"Serverless REST API endpoints on gateway-backed functions","headline":"Serverless REST API endpoints on gateway-backed functions","description":"Public JSON APIs on serverless functions: API gateway auth, CORS, rate limits, versioning, and route groups without a routing monolith.","inLanguage":"en-US","isPartOf":{"@id":"https://inquir.org/#website"},"author":{"@type":"Organization","name":"Inquir"},"datePublished":"2025-01-01T00:00:00.000Z","dateModified":"2026-04-20T00:00:00.000Z","citation":"https://inquir.org/docs"},{"@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://inquir.org"},{"@type":"ListItem","position":2,"name":"Use cases","item":"https://inquir.org/use-cases"},{"@type":"ListItem","position":3,"name":"Serverless REST API endpoints","item":"https://inquir.org/use-cases/rest-api-endpoints"}]},{"@type":"FAQPage","@id":"https://inquir.org/use-cases/rest-api-endpoints#faq","url":"https://inquir.org/use-cases/rest-api-endpoints","isPartOf":{"@id":"https://inquir.org/use-cases/rest-api-endpoints#webpage"},"mainEntity":[{"@type":"Question","name":"Can I expose GraphQL from a serverless function?","acceptedAnswer":{"@type":"Answer","text":"Yes—a single function can host your schema and resolvers; rate limits, auth, and cold/warm behavior still apply at the gateway."}},{"@type":"Question","name":"How small should each REST function be?","acceptedAnswer":{"@type":"Answer","text":"Group routes that deploy and fail together; splitting every path into its own function can explode ops noise—find a balance your team can own."}},{"@type":"Question","name":"Where do API keys and JWT validation live?","acceptedAnswer":{"@type":"Answer","text":"Prefer gateway-level auth hooks where possible so handlers assume already-authenticated context and stay easier to test."}}]}]}