tester

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasFields

func HasFields(s *graphql.Schema, typename string, fields []string) error

HasFields checks weather the type has the specified fields

func HasType

func HasType(s *graphql.Schema, typename string) bool

HasType returns true if the typename exists on the schema

func OnlyHasFields

func OnlyHasFields(s *graphql.Schema, typename string, fields []string) error

OnlyHasFields checks weather the type only has the specified fields and no more

func TypeKind

func TypeKind(s *graphql.Schema, typename string) string

TypeKind returns the kind of a type If no type is found an empty string is returned

Types

type Field

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

Field contains a subset of fields from the graphql __Field type https://spec.graphql.org/October2021/#sec-Schema-Introspection

type Type

type Type struct {
	Kind   string  `json:"kind"`
	Fields []Field `json:"fields"`
}

Type contains a subset of fields from the graphql __Type type https://spec.graphql.org/October2021/#sec-Schema-Introspection

func GetTypeByName

func GetTypeByName(s *graphql.Schema, typename string) *Type

GetTypeByName returns a schema type based on it's typename

Jump to

Keyboard shortcuts

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