Skip to content

Releases: apollographql/apollo-rs

[email protected]

16 Aug 13:51
980d47a
Compare
Choose a tag to compare

0.2.0 - 2022-08-16

Breaking

  • inline_fragment().type_condition() returns Option<&str> - lrlna, pull/282

    Instead of returning Option<&String>, we now return Option<&str>

  • Value -> DefaultValue for default_value fields - lrlna, pull/276

    default_value getters in Input Value Definitions and Variable Definitions now
    return DefaultValue type. This is a type alias to Value, and makes it
    consistent with the GraphQL spec.

Fixes

  • add type information to inline fragments - lrlna, pull/282, issue/280

    Inline fragments were missing type correct type information. We now search for
    applicable type's fields if a type condition exists, otherwise infer
    information from the current type in scope (as per spec)
    .Inline fragments

  • fix cycle error in fragment spreads referencing fragments - lrlna, pull/283, issue/281

    Because fragment definitions can have fragment spreads, we are running into a
    self-referential cycle when searching for a fragment definition to get its id.
    Instead, search for the fragment definition when getting a fragment in a
    fragment spread in the wrapper API.

Features

  • pub use ApolloDiagnostic - EverlastingBugstopper, pull/268

    Exports ApolloDiagnostic to allow users to use it in other contexts.

  • default_value getter in input_value_definition - lrlna, pull/273

    A getter for default values in input value definitions.

  • feat(compiler): add db.find_union_by_name() - lrlna, pull/272

    Allows to query unions in the database.

  • adds inline_fragments getter to SelectionSet - lrlna, pull/282

    Convenience method to get all inline fragments in the current selection set.

[email protected]

29 Jul 13:14
Compare
Choose a tag to compare

0.2.9 - 2022-07-27

Features

  • Provide APIs for SyntaxNode and SyntaxNodePtr - lrlna, pull/251

    Export a wrapper around SyntaxNodePtr provided by rowan. This allows access to pointers of the AST created by apollo-parser.

[email protected]

29 Jul 13:16
Compare
Choose a tag to compare

0.1.0 - 2022-07-27

Introducing apollo-compiler!

A query-based compiler for the GraphQL language.

The compiler provides validation and context for GraphQL documents with a comprehensive API.

This is still a work in progress, for outstanding issues, checkout out the
apollo-compiler label in our issue tracker.

[email protected]

10 Jun 14:09
71af407
Compare
Choose a tag to compare

0.2.8 - 2022-06-10

Fix

  • Use recursion limit both for selection set and field parsing - garypen and lrlna, pull/244

    This properly unifies the limits around recursion for both:

    • selection sets
    • fields

    The tests are expanded and properly exercise the various possible outcomes
    with recursion limits.Fixes a bug with

[email protected]

08 Jun 12:43
Compare
Choose a tag to compare

0.2.7 - 2022-06-08

Features

  • Resource bound parsing execution - garypen, pull/239 closes issue/225

    Introduce recursion limit enforced during SelectionSet parsing.

    There is now a default limit (4_096) applied to parsers during SelectionSet
    parsing to help prevent stack overflows. This limit can be set manually when
    creating a parser by using the new fn, Parser::with_recursion_limit().
    Details about recursion consumption can be retrieved using the new fn
    SyntaxTree::recursion_limit(). Recursion limit details are also output as
    part of the AST debug output when printing a SyntaxTree.

[email protected]

24 May 10:26
5d977cd
Compare
Choose a tag to compare

0.2.6 - 2022-05-24

Fixes

  • lex escaped characters in StringValue tokens - bnjjj, pull/228 closes issue/227, issue/229

    StringValues with correctly escaped quotation marks, e.g. { name(id: "\"escaped\"") }
    would error and not lex correctly. Additionally, invalid escapes in string
    values, e.g. { name(id: "escaped \a") } should have an error created in the
    lexer. Both issues are fixed, and correctly bubble up to the parser.

[email protected]

12 May 11:30
a2a2ecf
Compare
Choose a tag to compare

0.1.3 - 2022-05-12

Fixes

  • add interface definition to internal stack - bnjjj, pull/213

    Added support of interface definition in the stack to fill an operation with
    correct fields.

[email protected]

29 Apr 13:14
4e3460a
Compare
Choose a tag to compare

0.3.1 - 2022-04-29

Fixes

  • directive definition args are of ArgumentsDefinition type - lrlna, pull/211

    Directive Definition incorrectly had a Vec<InputValueDefinition> for internal
    arguments type instead of ArgumentsDefinition. This commit aligns this bit to
    the spec and uses ArgumentsDefinition as type.

[email protected]

28 Apr 14:02
19c1e8f
Compare
Choose a tag to compare

0.1.2 - 2022-04-28

Maintenance

  • Update apollo-encoder to 0.3.0 - lrlna, pull/207 pull/208
    apollo-encoder's 0.3.0 changes desciption and default-value setters to
    accept String as a parameter. This changes the internals of apollo-smith
    accordingly.

[email protected]

28 Apr 13:58
5ff4564
Compare
Choose a tag to compare

0.3.0 - 2022-04-28

Important: 4 breaking change below, indicated by BREAKING

BREAKING

  • ArgumentsDefinition::new() creates an empty instance of ArgumentsDefinition - lrlna, pull/207

    ArgumentsDefinition::new() now takes no arguments and creates a default empty
    vector of input value definitions. Previously, ::new() would accept a vector of input value definitions. This API is now represented as ::with_values().

  • all descriptions setters accept paramater of type String - lrlna, pull/207

    Previously all descriptions were set with a parameter of type
    Option<String>, which was not very user-friendly.

    let mut directive_def = DirectiveDefinition::new("provideTreat".to_string());
    directive_def.description("Ensures cats get treats.".to_string());
  • all default setters accept paramater of type String - lrlna, pull/208

    Similarly to above, previously all defaults were set with a parameter of type
    Option<String>. All defaults now accept String.

  • all default value setters are renamed to default_value - lrlna, pull/208

    Previously used "default" setters represented "default_value". Renaming the
    setters directly to default_value aligns with the spec.

      let ty = Type_::NamedType { name: "CatBreed".to_string() };
      let mut field = InputField::new("cat".to_string(), ty);
      field.default_value("Norwegian Forest".to_string());

Features

  • ArgumentsDefinition input value setter - lrlna, pull/207

    Individual input value definitions can be set with input_value setter:

    let input_value = InputValueDefinition::new(
        String::from("first"),
        Type_::NamedType {
            name: String::from("Int"),
        },
    );
    let args_definition = ArgumentsDefinition::new();
    args_definition.input_value(input_value);

Fixes

  • Use a more readable serialisation for input value definitions - lrlna, pull/207

    If any of the input value definitions in a given field definition comes with a
    description, we will multiline all input value definitions. That is to say,
    instead of serializing arguments definition like this:

    type Foo {
      "This is a description of the \`one\` field."
      one("This is a description of the \`argument\` argument." argument: InputType!): Type
    }

    we serialize it as:

    type Foo {
      "This is a description of the \`one\` field."
      one(
        "This is a description of the \`argument\` argument."
        argument: InputType!
      ): Type
    }

    This makes it a lot more readable, especially for users with a large number of
    input value definitions with descriptions.