Today, we’re announcing our next general release, Apollos 1.6. Featured in this release is a new and improved schema for many of our foundational data types, as well as lots of bug fixes and some cool new features.
Upgrading your app
To start the upgrade process, run the following command within each of your Apollos app directories. For example, you’ll run this command both within your
ApollosChurchApp react-native app, as well as within your
apollos-church-api GraphQL service:
npx @apollosproject/upgrade-tools upgrade
Most likely, this command will generate merge conflicts or other notices that will require manual steps. To help with this process, read through the release notes below.
BREAKING: Custom Features API
This is for anyone who has overridden core feature datasource functions. We no longer call
createGlobalId inside the
Feature.dataSource. ID's are now generated from
Feature.resolver. If you have added custom Features, you will need to do the same. If you have custom algorithms, remove all references to
createGlobalId in the algorithm. See LCBC’s update for examples.
There’s a lot to unpack in this enhancement. There are a few areas of the app that were explicitly enhanced and upgraded, some bugfixes that were granted on the side, and a some areas of future development that were unlocked.
The primary feature granted by this change was a back end schema update that breaks most of the ContentItem attributes into individual Interfaces and a front end Connected component update that queries those new interfaces.
For example, there is a new Interface called the
ContentNode that contains the
htmlContent node. On the client, the
ContentSingle (or as it’s called now,
ContentNode) route doesn’t look for data on a
ContentItem specifically, but on a
Now, when adding additional data sets into your app that don’t match the core
ContentItem types, you no longer have to extend ContentItem and it’s numerous fields, and then significantly update your front end. You should be able to get away with implementing the
ContentNode or whatever other interfaces are relevant and be done.
No work is needed on your end to support this functionality, but if you have created new
ContentItem implementations in the past, this would be a good time to also have those implementations extend the relevant Node interfaces.
With this release comes the incredible mobile app deployment suite, Fastlane. This will give you the ability to deploy your app to the test tracks of Android and iOS without having to pay for AppCenter. It also manages your iOS Certificates and Provisioning Profiles for you (🙌) so you don't have to worry about generating new stuff for every member of the team. For existing apps, this will require a little work to get exactly right due to existing CD infrastructure. We would love for everyone to give it a try, so ask your question on Slack if are having trouble setting it up on your own! I'll post another guide soon on how you can migrate from your existing setup.
This goes along with Fastlane but also comes with some other cool features. We needed a way to share Android keystore files among the group (Fastlane can't do that for you) so we are encrypting a couple of files to make them available to your CI. We also use this to share the most up to date environment variables for the API and app environments so you don't have to keep track of them in some text file or 1Password to share among the team. Create these four files:
- app/.env.shared // shared app environment variables - api/.env.shared // shared API environment variables - app/android/app/apollos.keystore // only needed for fastlane deploys - app/android/key.json // only needed for fastlane deploys
And then encrypt them with this new command:
yarn secrets -e <SOME SECURE PASSWORD>
Now commit the new
<file>.enc files to the repo and voila! Your secrets are on the internet 😬.
Miscellaneous bug fixes and stability improvements
- Caching improvements for Feed Features
- Improve reliability on pull to refetch on feeds
- Improvements to the GraphQL Apollo in-memory cache
- Modularizing of the Content experience into -apps library code. This means that for new Apollos Template generated apps, you won't have to maintain all of the ContentSingle code yourself
- Support for the ChurchOnline GraphQL API
- Improvements to the Like Button, as well as a new Share Button
- Add ability to make theme overrides within Auth screens and to Horizontal Cards
- Fixes in preparation for React-Native 63