Skip to content

feat: remote schema file support (schema_file + env var) - #1

Open
binary64 wants to merge 60 commits into
masterfrom
feat/hasura-lean-schema
Open

binary64 wants to merge 60 commits into
masterfrom
feat/hasura-lean-schema

Conversation

@binary64

@binary64 binary64 commented Mar 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

Avoids the ~2 GB memory spike from live GraphQL introspection at Hasura startup by allowing remote schema definitions to load from a pre-fetched local JSON file instead.

Changes

schema_file in add_remote_schema metadata

Add an optional schema_file field to the remote schema definition object:

{
  "type": "add_remote_schema",
  "args": {
    "name": "my_api",
    "definition": {
      "url": "https://api.example.com/graphql",
      "schema_file": "/etc/hasura/schemas/my_api.json"
    }
  }
}

When schema_file is set, Hasura reads the introspection JSON from disk instead of performing an HTTP introspection request. The url field is still required for runtime query forwarding.

HASURA_GRAPHQL_REMOTE_SCHEMA_FILE environment variable

A global fallback for any remote schema that doesn't have schema_file set in metadata:

HASURA_GRAPHQL_REMOTE_SCHEMA_FILE=/etc/hasura/schemas/remote.json

Priority order: schema_file in metadata > HASURA_GRAPHQL_REMOTE_SCHEMA_FILE env var > live HTTP introspection.

File format

Standard GraphQL introspection JSON response:

{"data": {"__schema": {"queryType": {"name": "Query"}, "types": [...]}}}

Impact

  • Startup RSS: ~2 GB → ~76 MB for large remote schemas (20,000+ types)
  • No remote service dependency at boot time
  • Fully backwards-compatible — omitting schema_file falls through to live introspection

dependabot Bot and others added 30 commits March 16, 2026 09:35
Bumps [goldenfile](https://github.com/calder/rust-goldenfile) from 1.9.1
to 1.11.0.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/calder/rust-goldenfile/commits">compare
view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=goldenfile&package-manager=cargo&previous-version=1.9.1&new-version=1.11.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)

</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
V3_GIT_ORIGIN_REV_ID: bd1aae94df7b0715b4260b917fb569046319984b
…ra#2438)

<!-- The PR description should answer 2 important questions: -->

### What

<!-- What is this PR trying to accomplish (and why, if it's not
obvious)? -->

<!-- Consider: do we need to add a changelog entry? -->

<!-- Does this PR introduce new validation that might break old builds?
-->

<!-- Consider: do we need to put new checks behind a flag? -->

Fix the regression of JWT auth between GraphQL Engine v2 and Hasura DDN.
Currently, `x-hasura-allowed-roles` variable is useless.
https://hasura.io/docs/2.0/auth/authentication/jwt/#hasura-jwt-format

> A x-hasura-default-role field. The role that will be used when the
optional `x-hasura-role` header is not passed.

### How

<!-- How is it trying to accomplish it (what are the implementation
steps)? -->

- Check if the `x-hasura-role` header exists.
- Validate if the value of `x-hasura-role` is in the
`x-hasura-allowed-role` list.
- Use this role instead of the`x-hasura-default-role` variable.

---------

Co-authored-by: Daniel Harvey <danieljamesharvey@gmail.com>
V3_GIT_ORIGIN_REV_ID: f3859f24127a75aad54333c067c1e55d58d01d96
PR-URL: hasura/graphql-engine-mono#11451
GitOrigin-RevId: 5a584e16c1aeb18dbd1f6e480efd5258c76fc138
GitOrigin-RevId: f2742d0953b1a423dd6c13eb33c4a0cc8ba14587
- haskell:9.10.2-slim doesn't exist on Docker Hub, use 9.10.3
- Free disk space on GHA runner before build
- Add 8GB swap for linker memory safety
- Limit GHC to -j1 with 6.5GB heap cap
- Increase timeout to 180 min (Haskell builds are slow)
- Remove Citus and Cockroach from PostgresKind (now Vanilla-only)
- Remove PostgresCitusKind/PostgresCockroachKind from BackendSourceKind
- Remove PostgresCitusTag/PostgresCockroachTag from BackendTag
- Remove PostgresCitusValue/PostgresCockroachValue from AnyBackend and
  all dispatch functions (liftTag, lowerTag, mapBackend, traverseBackend,
  mkAnyBackend, runBackend, dispatchAnyBackend*, composeAnyBackend,
  mergeAnyBackend, unpackAnyBackend, dispatchAnyBackendArrow,
  parseAnyBackendFromJSON, anyBackendCodec, backendSourceKindFromText,
  parseBackendSourceKindFromJSON)
- Remove PostgresBackend 'Citus and 'Cockroach instances (Types.hs)
- Remove Citus/Cockroach PostgresMetadata instances (Metadata.hs)
- Remove Citus/Cockroach BackendAPI instances (API.hs)
- Remove Citus/Cockroach BackendEventTrigger instances (Backend.hs)
- Remove Citus/Cockroach PostgresSchema instances (Schema.hs)
- Remove Citus/Cockroach PostgresAnnotatedFieldJSON instances
- Remove Citus/Cockroach PostgresGenerateSQLSelect instances and
  applyCockroachDistinctOnWorkaround helper
- Remove Citus/Cockroach ToMetadataFetchQuery, FetchTableMetadata,
  FetchFunctionMetadata instances (DDL/Source.hs)
- Remove RQCitusRunSql/RQCockroachRunSql from V2Query API
- Remove Citus/Cockroach subscription type detection (GraphQL/Execute.hs)
- Remove CitusExtraTableMetadata from cabal exposed-modules
- Remove citus_table_metadata.sql and cockroach_table_metadata.sql
  from cabal extra-source-files
- Remove VersionCheck and PingSource (Cockroach-only) from cabal
- Remove VersionCheckSpec from cabal test modules
- Fix pg-client: remove text-builder from build-depends and fromBuilder
  from Transaction.hs; update all callers to use PG.fromText + toSQLTxt

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove the DataConnector backend entirely from the codebase, keeping
only plain Postgres (Vanilla) and Remote Schemas. This includes:
- Deleted server/lib/dc-api and all DataConnector adapter/plan modules
- Removed DataConnector from BackendType, BackendTag, AnyBackend
- Simplified backendSourceMetadataCodec to Postgres-only
- Removed ciDataConnectors, _rmReloadDataConnectors, MODataConnectorAgent logic
- Stubbed RMDCAddAgent/RMDCDeleteAgent with J.Value and NotSupported error
- Added AgentLicenseKey stub to CredentialCache to preserve transport signatures
- Updated test files (BackendMapSpec, MetadataSpec, VersionSpec) to remove
  references to removed backends

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
api-tests depends on dc-api which lives in dc-agents/ — excluded from
the Docker context by .dockerignore. Remove api-tests, test-harness,
and upgrade-tests dirs before cabal build to prevent Cabal-7107
dependency resolution failure.
graphql-parser declares text-builder as a dependency but doesn't use it,
causing GHC-42258 with -Werror from dev-sh.project.local. Production
builds don't need -Werror on third-party packages.
dev-sh.project.local sets program-options ghc-options: -Werror which
can't be overridden by package * ghc-options. This causes graphql-parser
to fail on -Wunused-packages (text-builder). Use standalone production
config instead.
Without cabal.project.freeze, cabal resolves text-builder 1.0.0.5 which
renamed Text.Builder to TextBuilder, breaking graphql-parser. Pin to
0.6.x to match upstream's freeze file.
Removing cabal.project.freeze caused cascading dependency issues:
text-builder 1.0 (breaking API rename), jose/crypton incompatibility.

Keep the upstream freeze file (all deps pinned to known-good versions),
only relax the base version constraint for GHC 9.10.3 compatibility.
GHC 9.10.3 ships newer base, ghc-internal, ghc-boot, ghc-prim, etc.
The freeze file pins 9.10.2 versions. Remove all boot library pins
(they're installed with GHC and can't be overridden anyway) while
keeping all third-party dependency pins intact.
Use ghc-pkg list to detect all boot/bundled packages installed with
this GHC version, then remove their pins from the freeze file.
Handles the full set (base, ghc, ghc-internal, Cabal, text, containers,
etc.) without hardcoding package names.
Deleting constraint lines broke the freeze file syntax (first constraint
on same line as 'constraints:' keyword). Replace with >=0 instead.
GHC 9.10.3 breaks multiple third-party deps (text-2.1.2 exports show,
causing ambiguous name errors in mustache, etc.). The freeze file was
built for 9.10.2 — use that instead of fighting every incompatibility.
Build fixes:
- Add PostgresKind(..) to BackendMap.hs import (fixes Vanilla not in scope)
- Add server/CURRENT_VERSION file (fixes compile-time version bake)
- Remove unixodbc from Dockerfile (only needed for MSSQL)

Dead code removal (62 files):
- server/src-lib/Hasura/Backends/MSSQL/ (39 modules)
- server/src-lib/Hasura/Backends/BigQuery/ (23 modules)
- server/src-lib/Database/MSSQL/ (Pool, Transaction)
- server/src-rsr/mssql/ (SQL templates)
- server/test-mssql/ (test suite)
- Remove odbc dep, MSSQL/BQ module refs from graphql-engine.cabal
- Remove MSSQL import + CacheRM instance from SchemaCache.hs
- Remove unused MSSQL/BigQuery comparison_exp names from Name.hs

BigQuery experimental feature flags left as harmless dead code
(entangled with Schema.Options, safe to remove in follow-up).
binary64 added 19 commits March 21, 2026 05:41
Dependencies.hs line 326 still referenced MODataConnectorAgent which was
removed with the DataConnector backend strip. This was the sole build
error — 439/441 modules compiled before GHC-76037 killed it.
…357)

GHC 9.10.2 doesn't support trailing commas in record syntax. Previous
fix removed the MODataConnectorAgent pattern match, revealing this
parse error in the next compilation pass.
…data.hs:715)

MODataConnectorAgent was removed from the MetadataObjId data type as part
of DataConnector removal but the pattern match in purgeMetadataObj was not
cleaned up, causing GHC-76037 'Not in scope: data constructor' error.
ReloadMetadata now has 3 fields (DC field removed), but runReloadMetadata
still destructured 4. Another DataConnector remnant.
…ebug.Stub)

Main.hs imports GHC.Debug.Stub for the maybeWithGhcDebug function but
ghc-debug-stub was missing from the executable's build-depends stanza,
causing GHC-87110 'Could not find module' error in CI.
cabal list-bin graphql-engine occasionally returns empty output in CI,
causing 'cp: missing destination file operand'. Add a find-based fallback
to locate the compiled binary in dist-newstyle if list-bin fails.
Adds an optional 'schema_file' field to RemoteSchemaDef. When set,
Hasura reads the introspection JSON from the local filesystem instead
of making an HTTP request to the remote endpoint at startup.

The URL is still required for runtime query forwarding — this only
skips the introspection call. The file format is standard GraphQL
introspection JSON ({"data": {"__schema": {...}}}).

Usage in metadata:
  {
    "type": "add_remote_schema",
    "args": {
      "name": "my-service",
      "definition": {
        "url": "https://my-service/v1/graphql",
        "schema_file": "/etc/hasura/schemas/my-service.json"
      }
    }
  }

Benefits:
- Faster boot (no network round-trip for large schemas)
- No dependency on remote service being up during Hasura startup
- Deterministic schema (baked into image at build time)
- Avoids introspection timeout on very large schemas (20K+ types)
Remote schema management via metadata API is now disabled.
Returns 'not supported' error for add/update/remove/reload.
Only supports loading from local file via schema_file config.
Introspection endpoint still works for querying existing schema.
- Telemetry.hs reduced to no-op stub (sleep forever)
- Remote schema metadata API endpoints now return 'not supported'
- Only file-based remote schema loading supported
- dc-agents already removed in prior commit
- Scheduled trigger API endpoints now return 'not supported'
- Apollo Federation hardcoded to disabled (isApolloFederationEnabled always returns False)
- Removed docs/, cli/, community/, install-manifests/ (~153MB)
The schema_file feature in fetchRemoteSchema (RemoteServer.hs:70) was
implemented but unreachable because commit 36b43b3 blanket-blocked
all remote schema API endpoints with throw400 NotSupported.

Unblock RMAddRemoteSchema (calls runAddRemoteSchema which triggers
fetchRemoteSchema → reads schema_file from disk if set), plus
RMRemoveRemoteSchema and RMReloadRemoteSchema for manageability.

Permissions and relationship endpoints remain blocked as they're not
needed for the static schema_file use case.
@coderabbitai

coderabbitai Bot commented Mar 23, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 299 files, which is 149 over the limit of 150.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: ffa3ecf9-227f-41ac-999b-823b73d7ab04

📥 Commits

Reviewing files that changed from the base of the PR and between 37fd1e8 and 80fec54.

⛔ Files ignored due to path filters (1)
  • cli/go.sum is excluded by !**/*.sum
📒 Files selected for processing (299)
  • .dockerignore
  • .github/workflows/docker.yml
  • .gitignore
  • Dockerfile
  • README.md
  • STRIP_PLAN.md
  • cabal.project
  • cabal.project.freeze
  • cabal.project.static.local
  • cli/.gitignore
  • cli/.golangci.yaml
  • cli/.realize.yaml
  • cli/CONTRIBUTING.md
  • cli/Makefile
  • cli/README.md
  • cli/build/builder.dockerfile
  • cli/build/get-version.sh
  • cli/cli.go
  • cli/cli_test.go
  • cli/cmd/hasura/hasura.go
  • cli/commands/actions.go
  • cli/commands/actions_codegen.go
  • cli/commands/actions_codegen_test.go
  • cli/commands/actions_create.go
  • cli/commands/actions_create_test.go
  • cli/commands/actions_use_codegen.go
  • cli/commands/actions_use_codegen_test.go
  • cli/commands/commands_test.go
  • cli/commands/completion.go
  • cli/commands/console.go
  • cli/commands/deploy.go
  • cli/commands/deploy_test.go
  • cli/commands/docs.go
  • cli/commands/help.go
  • cli/commands/init.go
  • cli/commands/init_test.go
  • cli/commands/metadata.go
  • cli/commands/metadata_apply.go
  • cli/commands/metadata_apply_test.go
  • cli/commands/metadata_clear.go
  • cli/commands/metadata_clear_test.go
  • cli/commands/metadata_diff.go
  • cli/commands/metadata_diff_test.go
  • cli/commands/metadata_export.go
  • cli/commands/metadata_export_test.go
  • cli/commands/metadata_handlers.go
  • cli/commands/metadata_inconsistency.go
  • cli/commands/metadata_inconsistency_drop.go
  • cli/commands/metadata_inconsistency_drop_test.go
  • cli/commands/metadata_inconsistency_list.go
  • cli/commands/metadata_inconsistency_list_test.go
  • cli/commands/metadata_inconsistency_status.go
  • cli/commands/metadata_inconsistency_status_test.go
  • cli/commands/metadata_reload.go
  • cli/commands/metadata_reload_test.go
  • cli/commands/migrate.go
  • cli/commands/migrate_apply.go
  • cli/commands/migrate_apply_test.go
  • cli/commands/migrate_create.go
  • cli/commands/migrate_create_test.go
  • cli/commands/migrate_delete.go
  • cli/commands/migrate_delete_test.go
  • cli/commands/migrate_squash.go
  • cli/commands/migrate_squash_test.go
  • cli/commands/migrate_status.go
  • cli/commands/migrate_status_test.go
  • cli/commands/plugins.go
  • cli/commands/plugins_install.go
  • cli/commands/plugins_list.go
  • cli/commands/plugins_uninstall.go
  • cli/commands/plugins_upgrade.go
  • cli/commands/root.go
  • cli/commands/scripts.go
  • cli/commands/scripts_update_config_v2.go
  • cli/commands/scripts_update_config_v2_test.go
  • cli/commands/scripts_update_config_v3.go
  • cli/commands/scripts_update_config_v3_test.go
  • cli/commands/seed.go
  • cli/commands/seed_apply.go
  • cli/commands/seed_apply_test.go
  • cli/commands/seed_create.go
  • cli/commands/seed_create_test.go
  • cli/commands/testdata/config-v1-test-project/config.yaml
  • cli/commands/testdata/config-v1-test-project/migrations/1626431381198_create_table_public_t1/down.yaml
  • cli/commands/testdata/config-v1-test-project/migrations/1626431381198_create_table_public_t1/up.yaml
  • cli/commands/testdata/config-v1-test-project/migrations/1626431388159_create_table_public_t2/down.yaml
  • cli/commands/testdata/config-v1-test-project/migrations/1626431388159_create_table_public_t2/up.yaml
  • cli/commands/testdata/config-v1-test-project/migrations/1626431394139_create_table_public_t3/down.yaml
  • cli/commands/testdata/config-v1-test-project/migrations/1626431394139_create_table_public_t3/up.yaml
  • cli/commands/testdata/config-v1-test-project/migrations/metadata.yaml
  • cli/commands/testdata/config-v2-test-project/config.yaml
  • cli/commands/testdata/config-v2-test-project/metadata/actions.graphql
  • cli/commands/testdata/config-v2-test-project/metadata/actions.yaml
  • cli/commands/testdata/config-v2-test-project/metadata/allow_list.yaml
  • cli/commands/testdata/config-v2-test-project/metadata/cron_triggers.yaml
  • cli/commands/testdata/config-v2-test-project/metadata/functions.yaml
  • cli/commands/testdata/config-v2-test-project/metadata/query_collections.yaml
  • cli/commands/testdata/config-v2-test-project/metadata/remote_schemas.yaml
  • cli/commands/testdata/config-v2-test-project/metadata/rest_endpoints.yaml
  • cli/commands/testdata/config-v2-test-project/metadata/tables.yaml
  • cli/commands/testdata/config-v2-test-project/metadata/version.yaml
  • cli/commands/testdata/config-v2-test-project/migrations/1620138136207_create_table_public_t1/down.sql
  • cli/commands/testdata/config-v2-test-project/migrations/1620138136207_create_table_public_t1/up.sql
  • cli/commands/testdata/config-v2-test-project/migrations/1620138146208_create_table_public_t2/down.sql
  • cli/commands/testdata/config-v2-test-project/migrations/1620138146208_create_table_public_t2/up.sql
  • cli/commands/testdata/config-v2-test-project/migrations/1620138161039_create_table_public_t3/down.sql
  • cli/commands/testdata/config-v2-test-project/migrations/1620138161039_create_table_public_t3/up.sql
  • cli/commands/testdata/config-v2-test-project/migrations/1620138169404_create_table_public_t4/down.sql
  • cli/commands/testdata/config-v2-test-project/migrations/1620138169404_create_table_public_t4/up.sql
  • cli/commands/testdata/config-v2-test-project/migrations/1620138179776_create_table_public_t5/down.sql
  • cli/commands/testdata/config-v2-test-project/migrations/1620138179776_create_table_public_t5/up.sql
  • cli/commands/testdata/config-v2-test-project/migrations/1620138189381_create_table_public_t6/down.sql
  • cli/commands/testdata/config-v2-test-project/migrations/1620138189381_create_table_public_t6/up.sql
  • cli/commands/testdata/config-v2-test-project/migrations/1620138199344_create_table_public_t7/down.sql
  • cli/commands/testdata/config-v2-test-project/migrations/1620138199344_create_table_public_t7/up.sql
  • cli/commands/testdata/config-v3-test-project-concurrent-migrations/config.yaml
  • cli/commands/testdata/config-v3-test-project-concurrent-migrations/metadata/actions.graphql
  • cli/commands/testdata/config-v3-test-project-concurrent-migrations/metadata/actions.yaml
  • cli/commands/testdata/config-v3-test-project-concurrent-migrations/metadata/allow_list.yaml
  • cli/commands/testdata/config-v3-test-project-concurrent-migrations/metadata/cron_triggers.yaml
  • cli/commands/testdata/config-v3-test-project-concurrent-migrations/metadata/databases/databases.yaml
  • cli/commands/testdata/config-v3-test-project-concurrent-migrations/metadata/databases/pg/tables/tables.yaml
  • cli/commands/testdata/config-v3-test-project-concurrent-migrations/metadata/query_collections.yaml
  • cli/commands/testdata/config-v3-test-project-concurrent-migrations/metadata/remote_schemas.yaml
  • cli/commands/testdata/config-v3-test-project-concurrent-migrations/metadata/rest_endpoints.yaml
  • cli/commands/testdata/config-v3-test-project-concurrent-migrations/metadata/version.yaml
  • cli/commands/testdata/config-v3-test-project-concurrent-migrations/migrations/pg/1622047079431_chinook/down.sql
  • cli/commands/testdata/config-v3-test-project-concurrent-migrations/migrations/pg/1622047079431_chinook/up.sql
  • cli/commands/testdata/config-v3-test-project-concurrent-migrations/seeds/pg/.empty
  • cli/commands/testdata/config-v3-test-project/config.yaml
  • cli/commands/testdata/config-v3-test-project/metadata/actions.graphql
  • cli/commands/testdata/config-v3-test-project/metadata/actions.yaml
  • cli/commands/testdata/config-v3-test-project/metadata/allow_list.yaml
  • cli/commands/testdata/config-v3-test-project/metadata/cron_triggers.yaml
  • cli/commands/testdata/config-v3-test-project/metadata/databases/databases.yaml
  • cli/commands/testdata/config-v3-test-project/metadata/databases/pg/tables/public_albums.yaml
  • cli/commands/testdata/config-v3-test-project/metadata/databases/pg/tables/public_artists.yaml
  • cli/commands/testdata/config-v3-test-project/metadata/databases/pg/tables/public_genres.yaml
  • cli/commands/testdata/config-v3-test-project/metadata/databases/pg/tables/public_media_types.yaml
  • cli/commands/testdata/config-v3-test-project/metadata/databases/pg/tables/public_playlist_track.yaml
  • cli/commands/testdata/config-v3-test-project/metadata/databases/pg/tables/public_playlists.yaml
  • cli/commands/testdata/config-v3-test-project/metadata/databases/pg/tables/public_tracks.yaml
  • cli/commands/testdata/config-v3-test-project/metadata/databases/pg/tables/tables.yaml
  • cli/commands/testdata/config-v3-test-project/metadata/query_collections.yaml
  • cli/commands/testdata/config-v3-test-project/metadata/remote_schemas.yaml
  • cli/commands/testdata/config-v3-test-project/metadata/rest_endpoints.yaml
  • cli/commands/testdata/config-v3-test-project/metadata/version.yaml
  • cli/commands/testdata/config-v3-test-project/migrations/pg/1622047079431_chinook/down.sql
  • cli/commands/testdata/config-v3-test-project/migrations/pg/1622047079431_chinook/up.sql
  • cli/commands/testdata/config-v3-test-project/seeds/pg/.empty
  • cli/commands/testdata/init_test/config-v2/metadata/version.golden.yaml
  • cli/commands/testdata/init_test/config-v3/metadata/version.golden.yaml
  • cli/commands/testdata/migrate-squash-test/migrations/1588172667957_create_table_public_table1/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172667957_create_table_public_table1/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172668118_create_table_public_table2/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172668118_create_table_public_table2/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172668179_create_table_public_table3/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172668179_create_table_public_table3/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172668232_create_table_public_table4/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172668232_create_table_public_table4/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172668287_create_table_public_table5/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172668287_create_table_public_table5/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172668342_create_table_public_table6/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172668342_create_table_public_table6/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172668394_create_table_public_table7/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172668394_create_table_public_table7/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172668471_create_table_public_table8/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172668471_create_table_public_table8/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172668531_create_table_public_table9/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172668531_create_table_public_table9/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172668585_create_table_public_table10/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172668585_create_table_public_table10/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172668637_create_table_public_table11/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172668637_create_table_public_table11/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172668691_create_table_public_table12/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172668691_create_table_public_table12/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172668743_create_table_public_table13/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172668743_create_table_public_table13/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172668796_create_table_public_table14/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172668796_create_table_public_table14/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172668852_create_table_public_table15/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172668852_create_table_public_table15/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172668912_create_table_public_table16/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172668912_create_table_public_table16/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172668965_create_table_public_table17/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172668965_create_table_public_table17/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172669023_create_table_public_table18/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172669023_create_table_public_table18/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172669088_create_table_public_table19/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172669088_create_table_public_table19/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172669143_create_table_public_table20/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172669143_create_table_public_table20/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172669198_create_table_public_table21/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172669198_create_table_public_table21/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172669252_create_table_public_table22/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172669252_create_table_public_table22/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172669304_create_table_public_table23/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172669304_create_table_public_table23/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172669359_create_table_public_table24/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172669359_create_table_public_table24/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172669412_create_table_public_table25/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172669412_create_table_public_table25/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172669476_create_table_public_table26/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172669476_create_table_public_table26/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172669539_create_table_public_table27/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172669539_create_table_public_table27/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172669593_create_table_public_table28/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172669593_create_table_public_table28/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172669646_create_table_public_table29/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172669646_create_table_public_table29/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172669699_create_table_public_table30/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172669699_create_table_public_table30/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172669752_create_table_public_table31/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172669752_create_table_public_table31/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172669806_create_table_public_table32/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172669806_create_table_public_table32/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172669861_create_table_public_table33/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172669861_create_table_public_table33/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172669920_create_table_public_table34/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172669920_create_table_public_table34/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172669974_create_table_public_table35/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172669974_create_table_public_table35/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172670028_create_table_public_table36/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172670028_create_table_public_table36/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172670088_create_table_public_table37/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172670088_create_table_public_table37/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172670146_create_table_public_table38/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172670146_create_table_public_table38/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172670201_create_table_public_table39/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172670201_create_table_public_table39/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172670256_create_table_public_table40/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172670256_create_table_public_table40/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172670313_create_table_public_table41/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172670313_create_table_public_table41/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172670367_create_table_public_table42/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172670367_create_table_public_table42/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172670422_create_table_public_table43/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172670422_create_table_public_table43/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172670478_create_table_public_table44/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172670478_create_table_public_table44/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172670532_create_table_public_table45/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172670532_create_table_public_table45/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172670588_create_table_public_table46/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172670588_create_table_public_table46/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172670644_create_table_public_table47/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172670644_create_table_public_table47/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172670697_create_table_public_table48/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172670697_create_table_public_table48/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172670757_create_table_public_table49/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172670757_create_table_public_table49/up.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172670820_create_table_public_table50/down.sql
  • cli/commands/testdata/migrate-squash-test/migrations/1588172670820_create_table_public_table50/up.sql
  • cli/commands/testdata/migrate-squash-test/want_from.down.sql
  • cli/commands/testdata/migrate-squash-test/want_from.up.sql
  • cli/commands/testdata/migrate-squash-test/want_from_to.down.sql
  • cli/commands/testdata/migrate-squash-test/want_from_to.up.sql
  • cli/commands/update-cli.go
  • cli/commands/version.go
  • cli/directory.go
  • cli/get.sh
  • cli/global_config.go
  • cli/go.mod
  • cli/integration_test/cli.go
  • cli/integration_test/cli_test.go
  • cli/integration_test/testdata/incomplete_metadata/t1/from-server.golden
  • cli/integration_test/testdata/incomplete_metadata/t1/metadata/sources.yaml
  • cli/integration_test/testdata/incomplete_metadata/t2/from-server.golden
  • cli/integration_test/testdata/incomplete_metadata/t2/metadata/sources.yaml
  • cli/integration_test/v2/console.go
  • cli/integration_test/v2/init.go
  • cli/integration_test/v2/metadata.go
  • cli/integration_test/v2/metadata/latest/1_metadata/actions.graphql
  • cli/integration_test/v2/metadata/latest/1_metadata/actions.yaml
  • cli/integration_test/v2/metadata/latest/1_metadata/allow_list.yaml
  • cli/integration_test/v2/metadata/latest/1_metadata/cron_triggers.yaml
  • cli/integration_test/v2/metadata/latest/1_metadata/functions.yaml
  • cli/integration_test/v2/metadata/latest/1_metadata/query_collections.yaml
  • cli/integration_test/v2/metadata/latest/1_metadata/remote_schemas.yaml
  • cli/integration_test/v2/metadata/latest/1_metadata/tables.yaml
  • cli/integration_test/v2/metadata/latest/1_metadata/version.yaml
  • cli/integration_test/v2/metadata/latest/2_metadata/actions.graphql
  • cli/integration_test/v2/metadata/latest/2_metadata/actions.yaml
  • cli/integration_test/v2/metadata/latest/2_metadata/allow_list.yaml
  • cli/integration_test/v2/metadata/latest/2_metadata/cron_triggers.yaml
  • cli/integration_test/v2/metadata/latest/2_metadata/functions.yaml
  • cli/integration_test/v2/metadata/latest/2_metadata/query_collections.yaml
  • cli/integration_test/v2/metadata/latest/2_metadata/remote_schemas.yaml
  • cli/integration_test/v2/metadata/latest/2_metadata/tables.yaml
  • cli/integration_test/v2/metadata/latest/2_metadata/version.yaml
  • cli/integration_test/v2/metadata/v1.1/1_metadata/allow_list.yaml
  • cli/integration_test/v2/metadata/v1.1/1_metadata/functions.yaml
  • cli/integration_test/v2/metadata/v1.1/1_metadata/query_collections.yaml
  • cli/integration_test/v2/metadata/v1.1/1_metadata/remote_schemas.yaml
  • cli/integration_test/v2/metadata/v1.1/1_metadata/tables.yaml
  • cli/integration_test/v2/metadata/v1.1/1_metadata/version.yaml
  • cli/integration_test/v2/metadata/v1.1/2_metadata/allow_list.yaml
  • cli/integration_test/v2/metadata/v1.1/2_metadata/functions.yaml
  • cli/integration_test/v2/metadata/v1.1/2_metadata/query_collections.yaml
  • cli/integration_test/v2/metadata/v1.1/2_metadata/remote_schemas.yaml

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/hasura-lean-schema

Comment @coderabbitai help to get the list of available commands and usage tips.

…docs

Implements the HASURA_GRAPHQL_REMOTE_SCHEMA_FILE environment variable as
a global fallback for remote schema file paths. Priority order:
  1. schema_file in remote schema metadata definition (per-schema)
  2. HASURA_GRAPHQL_REMOTE_SCHEMA_FILE env var (global fallback)
  3. Live HTTP introspection (default upstream behaviour)

Also rewrites the README documentation section with:
- Accurate description of both mechanisms
- File format specification
- Kubernetes/Docker usage example with ConfigMap volume mount
- Introspection query snippet for generating the file
- Updated Docker image tag reference
@binary64 binary64 changed the title feat: remote schema local file support (schema_file + env var) feat: remote schema file support (schema_file + env var) Mar 23, 2026
@binary64
binary64 force-pushed the feat/hasura-lean-schema branch from ce13efd to 2c8f3a3 Compare March 23, 2026 20:08
@binary64
binary64 force-pushed the feat/hasura-lean-schema branch from 2c8f3a3 to 5a1bc1b Compare March 23, 2026 21:34
binary64 and others added 4 commits March 24, 2026 19:03
… paths)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…d via glob)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Assignees

Couldn't load assignees.