From 9630389b902013124138d2f0294ac90563c47d9d Mon Sep 17 00:00:00 2001 From: Alec Aivazis Date: Thu, 28 Mar 2024 23:20:53 -0700 Subject: [PATCH] fix matchVariables --- .changeset/witty-cherries-visit.md | 5 +++++ packages/houdini/src/runtime/router/match.ts | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changeset/witty-cherries-visit.md diff --git a/.changeset/witty-cherries-visit.md b/.changeset/witty-cherries-visit.md new file mode 100644 index 0000000000..fa28c0369a --- /dev/null +++ b/.changeset/witty-cherries-visit.md @@ -0,0 +1,5 @@ +--- +'houdini-react': patch +--- + +fix bug with useRoute pulling route params diff --git a/packages/houdini/src/runtime/router/match.ts b/packages/houdini/src/runtime/router/match.ts index d084917c97..7445642d8b 100644 --- a/packages/houdini/src/runtime/router/match.ts +++ b/packages/houdini/src/runtime/router/match.ts @@ -61,7 +61,9 @@ export function find_match<_ComponentType>( } // we might have to marshal the variables - let variables: GraphQLVariables = {} + let variables: GraphQLVariables = { + ...matchVariables, + } // each of the matched documents might tell us how to handle a subset of the // matchVariables. look at every document's input specification and marshal // any values that are in matchVariables