diff --git a/graphql_parser/lib/src/language/ast/boolean_value.dart b/graphql_parser/lib/src/language/ast/boolean_value.dart index 62b78046..423f0cde 100644 --- a/graphql_parser/lib/src/language/ast/boolean_value.dart +++ b/graphql_parser/lib/src/language/ast/boolean_value.dart @@ -2,18 +2,26 @@ import 'package:source_span/source_span.dart'; import 'input_value.dart'; import '../token.dart'; +/// A GraphQL boolean value literal. class BooleanValueContext extends InputValueContext { bool _valueCache; - final Token BOOLEAN; - BooleanValueContext(this.BOOLEAN) { - assert(BOOLEAN?.text == 'true' || BOOLEAN?.text == 'false'); + /// The source token. + final Token boolean; + + BooleanValueContext(this.boolean) { + assert(boolean?.text == 'true' || boolean?.text == 'false'); } - bool get booleanValue => _valueCache ??= BOOLEAN.text == 'true'; + /// The [bool] value of this literal. + bool get booleanValue => _valueCache ??= boolean.text == 'true'; + + /// Use [boolean] instead. + @deprecated + Token get BOOLEAN => boolean; @override - FileSpan get span => BOOLEAN.span; + FileSpan get span => boolean.span; @override bool computeValue(Map variables) => booleanValue;