Skip to content

v0.9.0

Compare
Choose a tag to compare
@obmarg obmarg released this 11 Sep 20:17

Breaking Changes

  • InputObject no longer has a serialize method - this is now handled by a
    SerializableArgument impl instead, which is generated by the InputObject
    derive.
  • Query has been renamed to Operation to make it clear it's used for both
    queries & mutations.
  • Query::new is now Operation::query

New Features

  • InputObjects can now be derived and will be generated by querygen.
  • Querygen output is now tested more thoroughly - should be less changes
    required by users just to get it to compile.
  • Cynic now supports running & generating code for mutations.

Removed Features

  • Removed the optimised_query_modules feature from codegen, as it invovled
    more code than it was worth to keep it around. Functionally this should make
    no difference, though it may change performance characteristics of compiling
    cynic code. Didn't seem to make a significant difference when I was using it
    though.

Bug Fixes

  • Fixed a compile issue in the generated query_dsl for schemas with fields
    with > 1 required argument.
  • Fixed an issue that required users to add serde_json to their dependencies.
    We now re-export it as cynic::serde_json and use that in our derive output.
  • querygen now adds rename_all="SCREAMING_SNAKE_CASE" to Enums by default -
    the GQL convention is to have them in this format and querygen was already
    doing the transformation into the PascalCase rust usually uses so this
    should make things more likely to work by default.
  • Removed fontawesome from the querygen HTML. Think I added this along with
    bulma but it's not being used, and adds 400kb to the payload.
  • Fixed a bug where querygen would not snake case field names when generating
    QueryFragments.
  • querygen will now take references to arguments rather than ownership (which
    didn't work for most non-enum types).
  • Fixed an issue where querygen was adding ID literals as Strings in arguments,
    rather than IDs.