pub struct FrameworkConfig<'a> {
pub framework_import: Option<&'a str>,
pub query_fn_name: &'a str,
pub stream_fn_name: &'a str,
pub input_as_getter: bool,
pub query_interfaces: &'a [&'a str],
pub mutation_interfaces: &'a [&'a str],
pub stream_interfaces: &'a [&'a str],
pub query_impl: &'a str,
pub mutation_impl: &'a str,
pub stream_impl: &'a str,
}Expand description
Configuration for generating a framework-specific reactive wrapper file.
Fields§
§framework_import: Option<&'a str>Framework-specific import line (e.g. import { useState, ... } from "react";).
None for Svelte which has no framework import.
query_fn_name: &'a strName of the query function (e.g. "useQuery" or "createQuery").
stream_fn_name: &'a strName of the stream function (e.g. "useStream" or "createStream").
input_as_getter: boolWhether non-void query input is a getter () => QueryInput<K> (Svelte/Vue/Solid)
or a direct value QueryInput<K> (React).
query_interfaces: &'a [&'a str]TypeScript interface constants for queries (options, result).
mutation_interfaces: &'a [&'a str]TypeScript interface constants for mutations (options, result).
stream_interfaces: &'a [&'a str]TypeScript interface constants for streams (options, result).
query_impl: &'a strQuery implementation block (TypeScript source).
mutation_impl: &'a strMutation implementation block (TypeScript source).
stream_impl: &'a strStream implementation block (TypeScript source).