graphql

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2021 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UUID = graphql.NewScalar(graphql.ScalarConfig{
	Name:        "UUID",
	Description: "The UUID scalar to check string is UUID format",
	Serialize:   coerceUUID,
	ParseValue:  coerceUUID,
	ParseLiteral: func(valueAST ast.Value) interface{} {
		switch valueAST := valueAST.(type) {
		case *ast.StringValue:
			if uuid, err := uuid.FromString(valueAST.Value); err == nil {
				return uuid.String()
			}
		}
		return nil
	},
})

Functions

func GetSelectedFields

func GetSelectedFields(params graphql.ResolveParams) (map[string]interface{}, error)

* GetSelectedFields Read the requested fields in Resolve Ref: https://github.com/graphql-go/graphql/issues/125, https://github.com/graphql-go/graphql/issues/157

Types

This section is empty.

Jump to

Keyboard shortcuts

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