stateToQueryString = (state, include_id) => {
  if (!state || Object.keys(state).length === 0) return "";

  return (
    "?" +
    Object.entries(state)
      .map(([k, v]) =>
        k === "id" && !include_id
          ? null
          : `${encodeURIComponent(k)}=${encodeURIComponent(
              k === "_relation_path_" && typeof v !== "string"
                ? queryToString(v)
                : v
            )}`
      )
      .filter((s) => !!s)
      .join("&")
  );
}
@function
@param {object} [state]
@returns {string}