Back to godoc.org

Package graphql

v0.7.0
Latest Go to latest
Published: Feb 26, 2020 | License: BSD-3-Clause | Module: gonum.org/v1/gonum

Overview

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

Index

Package Files

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.

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.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier