Skip to content
Compare
Choose a tag to compare
@lrlna lrlna released this 17 Feb 17:47
· 742 commits to main since this release
d6cee6d

0.2.3 - 2021-02-17

Features

  • expose Lexer as a pub struct - bnjjj, pull/168

    The Lexer in apollo-parser is now a publicly available interface.

    use apollo_parser::Lexer;
    
    let query = "
    {
        animal
        ...snackSelection
        ... on Pet {
          playmates {
            count
          }
        }
    }
    ";
    let lexer = Lexer::new(query);
    assert_eq!(lexer.errors().len(), 0);
    
    let tokens = lexer.tokens();

Fixes

  • add a getter for Directives in Variable Definitions - lrlna, pull/172

    While the parser was correctly parsing and accounting for directives in a
    variable definition, the getter for Directives in VariableDefinition type in the
    AST was missing. This commit makes an addition to the graphql ungrammar, and by
    extension the generated AST nodes API.