Skip to content

Conversation

@thescientist13
Copy link
Member

@thescientist13 thescientist13 commented Aug 26, 2025

Related Issue

resolves #882

Documentation

  1. TBD
    • routing conventions
    • SSR page props / params
    • API route props / params

Summary of Changes

  1. Adds dynamic routing / segment handling for SSR pages and API routes

See the following reference implementations

TODO

  1. Add support for dynamic API routing - https://github.com/thescientist13/greenwood-trpc/blob/master/patches/%40greenwood%2Bcli%2B0.33.0-alpha.7.patch
  2. Will likely need to adopt a polyfill as URLPattern is only supported in Node >= 23.8.0 (and is experimental)](https://nodejs.org/api/url.html#class-urlpattern) and hosting providers are still not supporting Node 24 yet
  3. windows test cases failing
  4. Add support in adapter plugins (including graph + url lib backports)
  5. standardize how the props / params are passed in (consistently) - call it props? params?
    • and should the second param be an object for API routes too?
  6. Final refactoring / clean up console logging / comments
  7. Final TODOs scan (e.g. passing props to getBody)
  8. Update test case per chore(workspace): refactor async test cases #1604

Thoughts / Questions

  1. made a Node 24 minimum version tracking issue - update to minimum Node version of >= 24.x #1614
  2. Can we now implement a version of getStaticPaths (own issue?)
  3. additional use cases like catch all and optional catch alls (discussion)?
  4. How to handle context for serverless functions? Should maybe track as part of Edge Runtime support for Adapter plugins #1141

@thescientist13 thescientist13 self-assigned this Aug 26, 2025
@thescientist13 thescientist13 added documentation Greenwood specific docs CLI SSR feature New feature or request Adapter labels Aug 26, 2025
@thescientist13 thescientist13 force-pushed the feature/issue-882-dynamic-routing branch from 09ff267 to fbdd244 Compare October 29, 2025 02:05
@thescientist13 thescientist13 added the Types(cript) Requires type definition or TypeScript related work / documentation label Nov 4, 2025
@thescientist13 thescientist13 changed the title feat(cli): dynamic SSR and API routing feat(cli): #882 dynamic SSR and API routing Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Adapter CLI documentation Greenwood specific docs feature New feature or request SSR Types(cript) Requires type definition or TypeScript related work / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SSR and API routes should support dynamic route naming (with prerendering)

2 participants