Skip to content

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

Public Properties

PropertyDescription
descriptionstring
namestring

description

Type
string
Default value
'The Money scalar type represents a money value as a string.'

View source

name

Type
string
Default value
'Money'

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

parseLiteral()

View source

Arguments

  • $valueNode
  • $variables

parseValue()

View source

Arguments

  • $value

serialize()

View source

Arguments

  • $value