graphql_parser2 8.0.0
graphql_parser2: ^8.0.0 copied to clipboard
Parses GraphQL queries and schemas. Also includes classes for the GraphQL AST.
Change Log #
8.0.0 #
Breaking changes in 8.0.0 #
- Breaking:
InlineFragmentContext.typeConditionandonTokenare nullable, as an inline fragment's type condition is optional. - Breaking:
InlineFragmentContextandFragmentSpreadContextuse theDirectivesmixin, so code can read their directives the same way as a field's. - Breaking: Leftover tokens after the last definition are reported as a syntax error.
- Breaking: Integers with leading zeros, such as
007, and numbers followed directly by a digit,.or letter are rejected. - Breaking: Block strings keep backslashes and are not trimmed. Their value is computed as in the GraphQL spec: common indentation and leading and trailing blank lines are removed.
- Breaking: A number with a fractional part or exponent is a
double, so1e3is1000.0, not theint1000. An integer too large for anintis adoubletoo. - Breaking: A
"..."string cannot hold a line break or a control character other than a tab. An unclosed string is reported as "Unterminated string." (or "Unterminated block string."), and one closed on its line with an invalid escape or character as "Invalid escape sequence or character in string.", at its opening quote, instead of running on to the next quote. - Breaking: A fragment cannot be named
on. - Breaking: A variable's default value cannot use a variable, such as
$a: Int = $b. - Breaking:
BooleanValueContext.localValueCacheis removed. It was never read.
New in 8.0.0 #
DirectiveContext.argumentslists all of a directive's arguments;argumentis the first of them.
Fixes in 8.0.0 #
- Directives: A directive with several arguments, such as
@dir(x: 1, y: 2), is parsed. - Fragments: An inline fragment without a type condition, such as
... @include(if: $x) { a }, is parsed. - Numbers: Exponents with an uppercase
Eor a sign, such as1E10and1E+5, are parsed. - Numbers: Exponents are parsed exactly, so
1e19no longer overflows to a negative number and1.1e2is110.0. - Strings: Block-string indentation counts only spaces and tabs, so other white space, such as a non-breaking space, is kept.
- Selections: The span of an empty merged selection set is
null, instead of throwing. - Strings: A block string may contain
"characters. - Errors: An operation without a selection set reports "Missing selection set in operation definition." instead of naming a fragment definition.
- Parser:
parseFragmentSpreadrestorescurrentwhen it backtracks. - Parser:
eatCommasis deprecated: the lexer skips commas, so it never did anything.
7.0.0 #
- Require Dart >= 3.13
6.5.0 #
- Require Dart >= 3.9
6.4.0 #
- Require Dart >= 3.8
- Updated
lintsto 6.0.0 - Updated dependencies to the latest release
6.3.0 #
- Require Dart >= 3.6
- Updated
lintsto 5.0.0
6.2.0 #
- Require Dart >= 3.3
- Updated
lintsto 4.0.0
6.1.0 #
- Updated
lintsto 3.0.0 - Fixed linter warnings
- Updated repository link
6.0.0 #
- Require dart >= 3.0.x
5.0.0 #
- Require dart >= 2.17.x
4.0.0 #
- Require dart >= 2.16.x
3.0.0 #
- Implemented directives
- Updated to SDK 2.15.x
2.1.0 #
- Upgraded from
pendantictolintslinter
2.0.2 #
- Fixed NNBD issues
2.0.1 #
- Updated array_value.dart
- Updated string_value.dart
2.0.0 #
- Migrated to support Dart SDK 2.12.x NNBD
- Rename
graphql_parsertographql_parser2
1.2.0 #
- Combine
ValueContextandVariableContextinto a singleInputValueContextsupertype.- Add
T computeValue(Map<String, dynamic> variables); - Resolve ##23.
- Add
- Deprecate old
ValueOrVariableclass, and parser/AST methods related to it.
1.1.4 #
- Fix broken int variable parsing - https://github.com/angel-dart/graphql/pull/32
1.1.2 #
- Parse the
subscriptionkeyword.
1.1.1 #
- Pubspec updates for Dart 2.
1.1.0 #
- Removed
GraphQLVisitor. - Enable parsing operations without an explicit name.
- Parse
null. - Completely ignore commas.
- Ignore Unicode BOM, as per the spec.
- Parse object values.
- Parse enum values.