Skip to content

apollo-compiler@1.0.0-beta.12 (#804)

Choose a tag to compare

@goto-bus-stop goto-bus-stop released this 15 Jan 11:12
· 189 commits to main since this release
523d9ce

BREAKING

  • InputValueDefinition::is_required() returns false if it has a default value - goto-bus-stop, pull/798
    • Now argument.is_required() == true only if the type is non-null and there is no
      default value, meaning a value must be provided when it's used.

Features

  • Implement fmt::Display for ComponentName - goto-bus-stop, pull/795
  • Add FieldDefinition::argument_by_name and DirectiveDefinition::argument_by_name - goto-bus-stop, pull/801
    • These methods return an argument definition by name, or None.
  • Add .lookup methods to schema coordinates - goto-bus-stop, pull/803
    • coord!(Type).lookup(&schema) returns the type definition for Type.
    • coord!(Type.field).lookup_field(&schema) returns the field definition for field.
    • coord!(Enum.VALUE).lookup_enum_value(&schema) returns the enum value definition for VALUE.
    • coord!(InputType.field).lookup_input_field(&schema) returns the input field definition for field.
    • coord!(Type.field(argument:)).lookup(&schema) returns the argument definition for argument.
    • coord!(@directive).lookup(&schema) returns the directive definition for @directive.
    • coord!(@directive(argument:)).lookup(&schema) returns the argument definition for argument.
    • string.parse::<SchemaCoordinate>()?.lookup(&schema) returns an enum with all the elements
      that can be looked up using schema coordinates.

Maintenance

  • update ariadne to 0.4.0 - pull/793
    Ariadne is the diagnostic printing crate used for validation errors. v0.4.0 improves memory usage.