nerdgraph

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2020 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NerdGraph

type NerdGraph struct {
	// contains filtered or unexported fields
}

NerdGraph is used to communicate with the New Relic's GraphQL API, NerdGraph.

func New

func New(config config.Config) NerdGraph

New returns a new GraphQL client for interacting with New Relic's GraphQL API, NerdGraph.

func (*NerdGraph) Query

func (n *NerdGraph) Query(query string, variables map[string]interface{}) (interface{}, error)

Query facilitates making a NerdGraph request with a raw GraphQL query. Variables may be provided in the form of a map. The response's data structure will vary based on the query provided.

type QueryResponse added in v0.13.0

type QueryResponse struct {
	Actor          interface{} `json:"actor,omitempty"`
	Docs           interface{} `json:"docs,omitempty"`
	RequestContext interface{} `json:"requestContext,omitempty"`
}

QueryResponse represents the top-level GraphQL response object returned from a NerdGraph query request.

Jump to

Keyboard shortcuts

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