Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Codec ¶ added in v0.4.3
type Codec struct{}
Codec implements the custom codec interface.
type Latency ¶
type Latency struct {
Start time.Time `json:"-"`
Parsing time.Duration `json:"query_parsing"`
Processing time.Duration `json:"processing"`
Json time.Duration `json:"json_conversion"`
ProtocolBuffer time.Duration `json:"pb_conversion"`
}
Latency is used to keep track of the latency involved in parsing and processing the query. It also contains information about the time it took to convert the result into a format(JSON/Protocol Buffer) that the client expects.
type SubGraph ¶
type SubGraph struct {
Attr string
Params params
// SrcUIDs is a list of unique source UIDs. They are always copies of destUIDs
// of parent nodes in GraphQL structure.
SrcUIDs *task.List
SrcFunc []string
FilterOp string
Filters []*SubGraph
Children []*SubGraph
// destUIDs is a list of destination UIDs, after applying filters, pagination.
DestUIDs *task.List
// contains filtered or unexported fields
}
SubGraph is the way to represent data internally. It contains both the query and the response. Once generated, this can then be encoded to other client convenient formats, like GraphQL / JSON.
func ToSubGraph ¶
ToSubGraph converts the GraphQuery into the internal SubGraph instance type.
func (*SubGraph) DebugPrint ¶ added in v0.7.0
DebugPrint prints out the SubGraph tree in a nice format for debugging purposes.
Click to show internal directories.
Click to hide internal directories.