graphqlfields

package
v2.64.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2026 License: Apache-2.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package graphqlfields renders GraphQL fragment bodies from a per-service field registry and a caller-supplied selection. Fields sharing a non-empty Container are grouped under `<container> { ... }`.

Nested template references (e.g. `{{ template "UserCoreBasic" }}`) are passed through verbatim; callers parse the returned string as part of the outer template tree.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildFragment

func BuildFragment(registry []Field, selected []string) (string, error)

BuildFragment renders selected fields in registry order. Unknown names return an error before rendering.

Types

type Field

type Field struct {
	Name      string
	Fragment  string
	Container string
}

Field maps a logical name to a GraphQL fragment. Container groups related fields under a single wrapping block (e.g. work-item widgets under `features { ... }`).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL