introspection

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: May 20, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SCALAR is a __TypeKind of type SCALAR
	SCALAR __TypeKind = iota
	// LIST is a __TypeKind of type LIST
	LIST
	// NON_NULL is a __TypeKind of type NON_NULL
	NON_NULL
	// OBJECT is a __TypeKind of type OBJECT
	OBJECT
	// ENUM is a __TypeKind of type ENUM
	ENUM
	// INTERFACE is a __TypeKind of type INTERFACE
	INTERFACE
	// UNION is a __TypeKind of type UNION
	UNION
	// INPUT_OBJECT is a __TypeKind of type INPUT_OBJECT
	INPUT_OBJECT
)

Variables

This section is empty.

Functions

func Parse__TypeKind

func Parse__TypeKind(name string) (__TypeKind, error)

Parse__TypeKind attempts to convert a string to a __TypeKind

Types

type Data

type Data struct {
	Schema Schema `json:"__schema"`
}

type Directive

type Directive struct {
	Name        string       `json:"name"`
	Description string       `json:"description"`
	Locations   []string     `json:"locations"`
	Args        []InputValue `json:"args"`
}

func NewDirective

func NewDirective() Directive

type EnumValue

type EnumValue struct {
	Name               string `json:"name"`
	Description        string `json:"description"`
	IsDeprecated       bool   `json:"isDeprecated"`
	DepreciationReason string `json:"depreciacionReason"`
}

type Field

type Field struct {
	Name               string       `json:"name"`
	Description        string       `json:"description"`
	Args               []InputValue `json:"args"`
	Type               TypeRef      `json:"type"`
	IsDeprecated       bool         `json:"isDeprecated"`
	DepreciationReason string       `json:"depreciacionReason"`
}

func NewField

func NewField() Field

type FullType

type FullType struct {
	Kind          __TypeKind   `json:"kind"`
	Name          string       `json:"name"`
	Description   string       `json:"description"`
	Fields        []Field      `json:"fields"`
	InputFields   []InputValue `json:"inputFields"`
	Interfaces    []TypeRef    `json:"interfaces"`
	EnumValues    []EnumValue  `json:"enumValues"`
	PossibleTypes []TypeRef    `json:"possibleTypes"`
}

func NewFullType

func NewFullType() FullType

type InputValue

type InputValue struct {
	Name         string  `json:"name"`
	Description  string  `json:"description"`
	Type         TypeRef `json:"type"`
	DefaultValue *string `json:"defaultValue"`
}

type Response added in v1.3.0

type Response struct {
	Data Data `json:"data"`
}

type Schema

type Schema struct {
	QueryType        *TypeName   `json:"queryType"`
	MutationType     *TypeName   `json:"mutationType"`
	SubscriptionType *TypeName   `json:"subscriptionType"`
	Types            []FullType  `json:"types"`
	Directives       []Directive `json:"directives"`
}

func NewSchema

func NewSchema() Schema

type TypeName

type TypeName struct {
	Name string `json:"name"`
}

type TypeRef

type TypeRef struct {
	Kind   __TypeKind `json:"kind"`
	Name   *string    `json:"name"`
	OfType *TypeRef   `json:"ofType"`
}

Jump to

Keyboard shortcuts

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