Money

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

Class Money implements the Money scalar type for GraphQL.

View source (opens new window)

# Public Properties

# description

Type
string (opens new window)
Default value
'TheMoneyscalar type represents a money value as a string.'

View source (opens new window)

# name

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

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\Money

# 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