Skip to content

Version 0.13.0

Compare
Choose a tag to compare
@designatednerd designatednerd released this 23 Jul 09:38

PLEASE READ THESE RELEASE NOTES BEFORE INSTALLING IF YOU WERE USING AN OLDER VERSION!

  • SUPER-BREAKING: Updated a ton of completion closures that could use it to use Result instead of optional parameter / optional error. (#644). There are a few details to this one to be particularly aware of:

    • If you see a bunch of Swift build errors that are claiming Generic Parameter "Query" could not be inferred, that means you need to update your completion closure to take the single Result<Parameter, Error> parameter instead of the two (Parameter?, Error?) parameters.
    • Particularly around caching, if there are places where both parameters were nil in previous iterations, you will now get an Error. This will generally be a JSONDecodingError.missingValue, either as the direct error or as the underlying error of a GraphQLResultError. Please check out the changes to FetchQueryTests in PR #644 for a better look at how some of that has changed.
  • BREAKING: Updated the codegen to use v2.16 of the Apollo CLI. (#647). This is a major version change so some things need to be added, and some parameter names have changed:

    • You must add --target=swift so the CLI knows to generate Swift code.
    • If you were using --schema=schema.json, use --localSchemaFile="schema.json" instead (the quotes are required!).
    • If you were using --queries="$(find . -name '*.graphql')" to pass in an array of all your GraphQL files, use --includes=./*.graphql instead.

    If you get error messages about multiple versions of node when you attempt to run, delete the node_modules folder in your source root and rebuild.

    Upgrading fixes several issues:

    • operationName is now generated for all operations.
    • Trailing newlines are now added to all generated files.
  • NEW: Ability to upload files according to the GraphQL Multi-part request spec. (#626, #648, inspired by #116)

  • NEW: Now that operationName is generated for all operations, we're sending it along with all requests. (#657, inspired by #492)

  • NEW: We're also sending operationName as the X-APOLLO-OPERATION-NAME header and when an operationIdentifier is provided, sending that as the X-APOLLO-OPERATION-ID header. (#658)

  • NEW: Option to run VACUUM on your SQLite store when clearing to help obliterate all traces of data. (#652)

  • NEW: Auto-generated API documentation from inline comments. Now available on the website NOTE: Any manual changes made to markdown files will get overwritten, if you want to contribute to the docs, please add inline comments to the code and then I'll get the docs updated. (#642).

  • Made GraphQLResultError and its underlying error public for better error handling. (#655)