Skip to content

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

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
getName()
getType()Returns a singleton instance to ensure one type per schema.
parseLiteral()
parseValue()
serialize()

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