🌟 Enterprise Feature 🌟 This feature is bundled with GraphQL-Enterprise.

Releasing Changesets

To be available to clients, Changesets added to the schema with use GraphQL::Enterprise::Changeset::Release:

class MyAppSchema < GraphQL::Schema
  use GraphQL::Enterprise::Changeset::Release, changesets: [
    Changesets::DeprecateRecipeFlag,
    Changesets::RemoveRecipeFlag,
  ]
end

Only changesets on the list will be shown to clients. The release ... configuration in the changeset will be compared to context[:changeset_version] to determine if the changeset applies to the current request.

Inspecting Releases

To preview releases, you can create schema dumps by passing context: { changeset_version: ... } to Schema.to_definition.

For example, to see how the schema looks with API-Version: 2021-06-01:

schema_sdl = MyAppSchema.to_definition(context: { changeset_version: "2021-06-01"})
# The GraphQL schema definition for the schema at version "2021-06-01":
puts schema_sdl

To make sure schema versions don’t change unexpectedly, use the techniques described in the Schema structure guide.