graphql

package
v0.0.0-...-3297e96 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateGoSDK

func GenerateGoSDK(schemaFile string, outputDirectory string) error

GenerateGoSDK generates a Go graphql sdk client from schema file.

Types

type Schema

type Schema struct {
	AstSchema     *ast.Schema
	Objects       map[string]*ast.Definition
	Inputs        map[string]*ast.Definition
	Scalars       map[string]*ast.Definition
	Unions        map[string]*ast.Definition
	Enums         map[string]*ast.Definition
	Mutations     []*ast.FieldDefinition
	Queries       []*ast.FieldDefinition
	Subscriptions []*ast.FieldDefinition
}

Schema contains the data about a graphql schema after extraction.

func LoadGraphqlSchema

func LoadGraphqlSchema(filenames ...string) (*Schema, error)

LoadGraphqlSchema loads graphql schemas from graphql schema files.

func NewSchema

func NewSchema(astSchema *ast.Schema) *Schema

NewSchema creates a new schema from an ast schema object.

Jump to

Keyboard shortcuts

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