buildReactiveInputQuery = (queryProps, id, initialData) => {
	const internal = writable(buildInputQuery(queryProps, id, initialData));

	let currentQuery;
	return {
		results: derived(internal, (v) => v),
		update: async (queryProps) => {
			const { hasQuery, query } = buildInputQuery(queryProps, id);
			if (!hasQuery) {
				internal.set({ hasQuery: false });
			} else {
				// We can run .fetch() with wreckless abandon because if the query
				// has already been fetched (e.g. hasn't changed), then this
				// is basically a no-op
				resolveMaybePromise(() => {
					if (query.hash !== currentQuery?.hash) {
						currentQuery = query;
						internal.set({ hasQuery, query });
					}
				}, query.fetch());
			}
		}
	};
}
@param {QueryProps} queryProps
@param {string} id
@param {Array<Record<string,unknown>>} initialData
@example export let value, data, label, order, where;
 $: queryProps = {value, data, label, order, where}
	const {results, update} = buildReactiveInputQuery(queryProps, `id`, $page.data.data[`id`])
	$: update({value, data, label, order, where})
	$: ({hasQuery, query} = $results)