graphql

package
v0.8.14 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2023 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package graphql implements JSON marshaling and unmarshaling of graph as used by GraphQL

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Unmarshal

func Unmarshal(data []byte, uid string, dst encoding.Builder) error

Unmarshal parses the JSON-encoded data and stores the result in dst. Node IDs are obtained from the JSON fields identified by the uid parameter. UIDs obtained from the JSON encoding must map to unique node ID values consistently across the JSON-encoded spanning tree.

Types

type LabelSetter

type LabelSetter interface {
	SetLabel(string)
}

LabelSetter is a graph edge that can set its label.

type StringIDSetter

type StringIDSetter interface {
	SetIDFromString(uid string) error
}

StringIDSetter is a graph node that can set its ID based on the given uid string.

Jump to

Keyboard shortcuts

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