Number

Type
Class
Namespace
craft\gql\types
Inherits
craft\gql\types\Number » GraphQL\Type\Definition\ScalarType
Implements
craft\gql\base\SingularTypeInterface
Since
3.4.0

Class Number implements the Number scalar type for GraphQL.

View source (opens new window)

# Public Properties

# description

Type
string (opens new window)
Default value
'TheNumberscalar type represents a number that can be a float, an integer or a null value.'

View source (opens new window)

# name

Type
string (opens new window)
Default value
'Number'

View source (opens new window)

# Public Methods

Method Description
getName()
getType() Returns a singleton instance to ensure one type per schema.
parseLiteral()
parseValue()
serialize()

# getName()

View source (opens new window)

Returns

string (opens new window)

# getType()

Returns a singleton instance to ensure one type per schema.

View source (opens new window)

Returns

craft\gql\types\Number

# parseLiteral()

View source (opens new window)

Arguments

  • $valueNode
  • $variables

# parseValue()

View source (opens new window)

Arguments

  • $value

# serialize()

View source (opens new window)

Arguments

  • $value