graphqlext

package
v0.3.35 Latest Latest
Warning

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

Go to latest
Published: May 7, 2021 License: Apache-2.0 Imports: 3 Imported by: 3

Documentation

Index

Constants

View Source
const (
	// MaxInt53 2^53 - 1
	MaxInt53 = 1<<53 - 1
	// MinInt53 -(2^53 - 1)
	MinInt53 = -((1 << 53) - 1)
)

Variables

View Source
var Int64 = graphql.NewScalar(graphql.ScalarConfig{
	Name: "Int64",
	Description: "The `Int64` scalar type represents non-fractional signed whole numeric " +
		"values. Int can represent values between -(2^53 - 1) and 2^53 - 1. ",
	Serialize:  coerceInt,
	ParseValue: coerceInt,
	ParseLiteral: func(valueAST ast.Value) interface{} {
		switch valueAST := valueAST.(type) {
		case *ast.IntValue:
			if intValue, err := strconv.Atoi(valueAST.Value); err == nil {
				return intValue
			}
		}
		return nil
	},
})

Int64 is the GraphQL Integer type definition.

View Source
var Timestamp = graphql.NewScalar(graphql.ScalarConfig{
	Name: "Timestamp",
	Description: "The `Timestamp` scalar type represents non-fractional signed whole numeric " +
		"values. Int can represent values between -(2^53 - 1) and 2^53 - 1. ",
	Serialize:  coerceInt,
	ParseValue: coerceInt,
	ParseLiteral: func(valueAST ast.Value) interface{} {
		switch valueAST := valueAST.(type) {
		case *ast.IntValue:
			if intValue, err := strconv.Atoi(valueAST.Value); err == nil {
				return intValue
			}
		}
		return nil
	},
})

Timestamp is the GraphQL Integer type definition.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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