modulepackage
0.0.0-20170602052103-08ddf3728865
Repository: https://github.com/tmc/graphql.git
Documentation: pkg.go.dev
# README
graphql
utilities for dealing with GraphQL queries in Go.
This package focuses on actually creating GraphQL servers and expects you to describe your schema directly in Go.
To that end this library initially has not emphasized GraphQL schema definition parsing and instead focuses on Query Documents and writing real servers.
license: ISC
version: Based on October2015 GraphQL Specification
status: unstable
contributions: encouraged
hacking
- go generate ./...
- go test ./...
# Packages
Package example contains usage examples.
Package executor produces results from a graphql Operation and Schema.
Package handler implements an HTTP interface to a Schema.
Package parser implements an experimental parser for a subset of graphql.
Package schema provides the ability to register objects to be exposed via a graphql api.
# Constants
OperationMutation is a mutation.
OperationQuery is a read operation.
# Structs
Argument is an argument to a Field Call.
ArgumentDefinition defines an argument for a field on a type.
Directive describes a directive which can alter behavior in different parts of a GraphQL Operation.
Document is the top-level representation of a string in GraphQL.
EnumDefinition defines an enum.
EnumValue describes a possible value for an enum.
A Field is one of the most important concepts in GraphQL.
FieldDefinition defines a fields on a type.
FragmentDefinition defines a Query Fragment.
FragmentSpread is a reference to a QueryFragment elsewhere in an Operation.
InlineFragment is used in-line to apply a type condition within a selection.
Interface descibes a set of methods a type must conform to to satisfy it.
Operation is either a read or mutation in GraphQL.
A Selection is either a Field, a FragmentSpread, or an InlineFragment.
Type describes an argument's type.
TypeDefinition defines a type.
TypeExtension extends an existing type.
Variable describes a reference to a variable.
VariableDefinition defines a variable for an Operation.
# Interfaces
Value refers to a value.
# Type aliases
Arguments is a collection of Argument values.
OperationType is either "query" or "mutation" Queries are reads and mutations cause side-effects.
SelectionSet is a collection of Selection.