Documentation
¶
Overview ¶
Package normalize ports the normalize* helpers from @graphql-codegen/plugin-helpers/src/helpers.ts and utils.ts.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Config ¶
func Config(v any) []plugin.ConfiguredPlugin
Config mirrors normalizeConfig: converts a plugin spec (string | []any | map) into a []ConfiguredPlugin.
func ImportExtension ¶
ImportExtension mirrors normalizeImportExtension.
func InstanceOrArray ¶
normalizeInstanceOrArray wraps a non-array value into a single-element slice, returns an empty slice for nil, and passes arrays through unchanged. Works on any (the decoded YAML value).
func OutputParam ¶
func OutputParam(v any) (*plugin.ConfiguredOutput, error)
OutputParam mirrors normalizeOutputParam: accepts either a bare plugin array (`["typescript", "add"]`) or a full object (`{ plugins: [...], preset: ... }`).
func StringSlice ¶
StringSlice normalizes a value that may be a string, []string, or []any of strings into a []string.
Types ¶
This section is empty.