scaler

package
v1.8.18 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2026 License: Apache-2.0 Imports: 6 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ScalarJSON = func() *graphql.Scalar {
	parseFn := func(valueAST ast.Value) interface{} {
		return customParseLiteral(nil)(valueAST)
	}
	return graphql.NewScalar(graphql.ScalarConfig{
		Name:        "JSON",
		Description: "খাটি JSON object, key:value pair",
		Serialize: func(value interface{}) interface{} {
			return value
		},
		ParseValue: func(value interface{}) interface{} {
			return value
		},
		ParseLiteral: *(*graphql.ParseLiteralFn)(unsafe.Pointer(&parseFn)),
	})
}()

ScalarJSON is a custom scalar type for JSON object

View Source
var ScalarJSONArray = graphql.NewScalar(graphql.ScalarConfig{
	Name:        "JSONArray",
	Description: "JSON array that can contain mixed types (strings, numbers, booleans)",
	Serialize: func(value interface{}) interface{} {
		return value
	},
	ParseValue: func(value interface{}) interface{} {
		return value
	},
	ParseLiteral: func() graphql.ParseLiteralFn {
		parseFn := customParseArrayLiteral
		return *(*graphql.ParseLiteralFn)(unsafe.Pointer(&parseFn))
	}(),
})

ScalarJSONArray is a custom scalar type for JSON array with mixed types

View Source
var UpdateModelTypeEnum = graphql.NewEnum(graphql.EnumConfig{
	Name: "UpdateModelTypeEnum",
	Values: graphql.EnumValueConfigMap{
		"update": &graphql.EnumValueConfig{
			Value:       "update",
			Description: "",
		},
		"rename": &graphql.EnumValueConfig{
			Value:       "rename",
			Description: "",
		},
		"duplicate": &graphql.EnumValueConfig{
			Value:       "duplicate",
			Description: "",
		},
		"convert": &graphql.EnumValueConfig{
			Value:       "convert",
			Description: "",
		},
		"delete": &graphql.EnumValueConfig{
			Value:       "delete",
			Description: "",
		},
	},
})

Functions

func ScalarJSONWithRequest

func ScalarJSONWithRequest(name string, incomingReq *models.GraphQLIncomingRequest) *graphql.Scalar

ScalarJSONWithRequest is a custom scalar type for JSON object

Types

This section is empty.

Jump to

Keyboard shortcuts

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