Skip to content

Search params#1691

Merged
AlecAivazis merged 19 commits into
mainfrom
search-params
Jun 21, 2026
Merged

Search params#1691
AlecAivazis merged 19 commits into
mainfrom
search-params

Conversation

@AlecAivazis

Copy link
Copy Markdown
Collaborator

Route queries can already pull variables from the URL path ([id]$id). This extends that to the query string: a page query's nullable variables that aren't satisfied by a route segment are now populated from URLSearchParams, with full type safety on both ends.

  • visiting /shows?genre=comedy runs the page query with $genre set. Changing the query string re-runs the query
    Repeated keys (?tag=a&tag=b) fill [String!] list variables.
  • ` gains a typed, optional `search` prop derived from the destination route's variables
  • only nullable variables are eligible, so a missing search param resolves to null and can never turn a valid URL into a failing request. A required variable that isn't backed by a route segment and has no default is now caught at build time with an actionable error, rather than failing at request time.
  • restructured and consolidated the navigation hooks (useLocation, useRoute, etc) into a single type-safe useRoute that relies on a newly exported PageRoute value from ./$types to provide type safety

closes #1210

@changeset-bot

changeset-bot Bot commented Jun 21, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ee04473

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
houdini Minor
houdini-react Minor
houdini-adapter-auto Major
houdini-adapter-cloudflare Major
houdini-adapter-node Major
houdini-adapter-static Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@AlecAivazis AlecAivazis merged commit 257e195 into main Jun 21, 2026
14 checks passed
@AlecAivazis AlecAivazis deleted the search-params branch June 21, 2026 04:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Infer query inputs / variables from URLSearchParams

1 participant