Keeping Schemas Up-To-Date in Client Apps

Recommendations and best practices for keeping client apps updated


Client apps need to keep their schemas up-to-date whenever changes are made to the supergraph. In order to facilitate this Apollo recommends setting up the following:

To ensure that your client operations are valid against the most recent schema, we recommend re-running code generation in your continuous integration system before merging client changes. The specific steps required are as follows:

  1. Fetch the latest production schema using any of the methods described above, prior to merging any changes to your client code

  2. Run codegen against this schema

  3. The codegen task will validate that any operations used by the client application are compatible with this schema.

Feedback

Forums