Skip to content

Number ​

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

Class Number

View source

Public Properties ​

PropertyDescription
descriptionstring
namestring

description ​

Type
string
Default value
'The Number scalar type represents a number that can be a float, an integer or a null value.'

View source

name ​

Type
string
Default value
'Number'

View source

Public Methods ​

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

__construct() ​

View source

Arguments ​

  • $config

getName() ​

View source

Returns ​

string

getType() ​

Returns a singleton instance to ensure one type per schema.

View source

Returns ​

craft\gql\types\Number

parseLiteral() ​

View source

Arguments ​

  • $valueNode
  • $variables

parseValue() ​

View source

Arguments ​

  • $value

serialize() ​

View source

Arguments ​

  • $value