function extractRouteParams(query = {}, params = {}) {
  const queryParams = Object.keys(query)
  const urlParams = {}
  for (const [key, value] of Object.entries(params)) {
    if (!queryParams.includes(key)) {
      urlParams[key] = value
    }
  }

  return urlParams
}
Extracts route params from an object that contains both
query and route params. The query params are automatically
assigned when transaction finishes based on the url

@param {object} query query params for given function call
@param {object} params next.js params that contain query, route, and built in params
@returns {object} route params