mix graphql_query.schema.check (graphql_query v0.6.2)

View Source

Checks whether locally stored schemas match their remote sources.

Downloads remote schemas and compares them with the locally stored versions. Useful in CI pipelines to detect schema drift.

Returns exit code 1 if any schemas differ or are missing locally.

Usage

# Check all remote schemas
mix graphql_query.schema.check

# Check a specific schema module
mix graphql_query.schema.check MyApp.ExternalSchema

Configuration

Schema modules must be configured with the :remote option:

defmodule MyApp.ExternalSchema do
  use GraphqlQuery.Schema,
    remote: [url: "https://api.example.com/schema.graphql"]
end