graphql

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2022 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package graphql contains the main API for GraphQL.

Example GraphQL query:

{
	Person @withValue(name : "Marvin") {
		key
		kind
		name
	}
}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseQuery

func ParseQuery(name string, query string) (*parser.ASTNode, error)

ParseQuery parses a GraphQL query and return its Abstract Syntax Tree.

func RunQuery

func RunQuery(name string, part string, query map[string]interface{},
	gm *graph.Manager, callbackHandler interpreter.SubscriptionCallbackHandler,
	readOnly bool) (map[string]interface{}, error)

RunQuery runs a GraphQL query against a given graph database. The query parameter needs to have the following fields:

operationName - Operation to Execute (string)
query         - Query document (string)
variables     - Variables map (map[string]interface{})

Set the readOnly flag if the query should only be allowed to do read operations.

Types

This section is empty.

Directories

Path Synopsis
Package interpreter contains the GraphQL interpreter for EliasDB.
Package interpreter contains the GraphQL interpreter for EliasDB.

Jump to

Keyboard shortcuts

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