Class: VariableDefinition

VariableDefinition

new VariableDefinition(name, type, defaultValueopt)

This constructor should not be invoked directly. Use the factory function Client#variable to create a VariableDefinition.

Parameters:
Name Type Attributes Description
name String

The name of the variable.

type String

The GraphQL type of the variable.

defaultValue * <optional>

The default value of the variable.

Source:

Methods

toInputValueString() → {String}

Returns the GraphQL query string for the variable as an input value (e.g. $variableName).

Source:
Returns:

The GraphQL query string for the variable as an input value.

Type
String

toString() → {String}

Returns the GraphQL query string for the variable (e.g. $variableName:VariableType = defaultValue).

Source:
Returns:

The GraphQL query string for the variable.

Type
String