Send custom parameters to wp-json

We are trying to add custom URL params to the wp-json request similar to this post that got abandoned. It does not look like there was ever a solution.

The goal is to include variable parameters like industry=healthcare or industry=construction in the request to Wordpress.

We found this github repo that is potentially what we need - using handlers

We have adopted it as such:
const project = {
priority: 10,
pattern: ā€œ/project/:slugā€,
func: async ({ route, params, state, libraries }) => {
// 1. get page with that slug.
const response = await libraries.source.api.get({
endpoint: ā€œprojectā€,
params: { test: ā€˜test parameterā€™ }
});

// 2. add it to the state.
const [project] = await libraries.source.populate({ response, state });

// 3. add info to data
Object.assign(state.source.data[route], {
  type: project.type,
    id: project.id,
    link: project.link
});

}
};

const before = async ({ libraries, actions }) => {
// Add handlers for both /project/:name.
libraries.source.handlers.push(project);
console.log(project)

// Fetch all the projects.
await actions.source.fetch("/project");
};

and the ā€œbeforeā€ function is set in the actions ā†’ theme as:
beforeSSR: before,
beforeCSR: before

But this does not seem to do anything. Can we get some clarification?
Like the other forum post mentioned, it is very unclear in documentation what needs to be done here. Weā€™re spinning our wheels on something that should be easy, I think.

We donā€™t have a public site/repo yet since the project is just getting started.

Thank you.