function

FieldAtPath

FieldAtPath returns the placement view of the field at canonical path segments beneath a resource's fields: field names, with a block slug after a Blocks field and tree key, case tag and slug after an embedding plugin field. It creates placement views only along that path.

Arguments

ArgumentTypeDescription
fields[]FieldThe fields value.
segments[]stringThe segments value.

Returns

The declared result.

(Field, bool)

Full signature

func FieldAtPath( fields []Field, segments []string, ) (Field, bool)

Source schema/block_registry.go:615

Related types

  • Field

    The resolved contract for one field.