swell/introspection

Values

pub fn build_type_map(
  types: List(schema.Type),
) -> dict.Dict(String, schema.Type)

Build a map from type name to canonical type instance This creates a registry that can be used to look up types by name, ensuring consistent type references throughout the system.

pub fn get_all_schema_types(
  graphql_schema: schema.Schema,
) -> List(schema.Type)

Get all types from the schema as schema.Type values Useful for testing and documentation generation

pub fn schema_introspection(
  graphql_schema: schema.Schema,
) -> value.Value

Build introspection value for __schema

pub fn type_by_name_introspection(
  graphql_schema: schema.Schema,
  type_name: String,
) -> option.Option(value.Value)

Build introspection value for __type(name: “TypeName”) Returns Some(type_introspection) if the type is found, None otherwise

Search Document