2

I have a usecase where I need to update the schema of the AWS AppSync. Since my app users will be having different versions of the app, the schema which needs to be used will be different for different versions.

Is there a way to do versioning of the AppSync schema and call different versions of the schema from the iOS and Android apps?

Can I get sample code pointers for both the platforms?

Kanhai Agarwal
  • 135
  • 1
  • 11

1 Answers1

7

GraphQL designers have a strong opinion against versioning of schemas.

Versioning was used in the past, or is used with REST API, to avoid introducing breaking changes.

GraphQL only returns the data that's explicitly requested, so new capabilities can be added via new types and new fields on those types without creating a breaking change. Deprecated fields can just be marked as deprecated (see https://facebook.github.io/graphql/draft/#sec--deprecated)

This has led to a common practice of always avoiding breaking changes and serving a versionless API.

Sébastien Stormacq
  • 14,301
  • 5
  • 41
  • 64