railt/graphql

View on GitHub
resources/grammar/expression/literal/null.pp2

Summary

Maintainability
Test Coverage

/**
 * --------------------------------------------------------------------------
 *  GraphQL Null Values
 * --------------------------------------------------------------------------
 *
 * Null values are represented as the keyword null.
 *
 * GraphQL has two semantically different ways to represent the lack
 * of a value:
 *     - Explicitly providing the literal value: null.
 *     - Implicitly not providing a value at all.
 *
 * @see https://facebook.github.io/graphql/June2018/#sec-Null-Value
 */

NullLiteral -> {
    return new Expr\Literal\NullLiteralNode();
}
  : <T_NULL>
  ;