Skip to content

feat: add schema_paths for loading schema from local paths and installed packages AR-3#439

Open
Minister944 wants to merge 2 commits into
mainfrom
AR-3-local-schema-external-package-resolution
Open

feat: add schema_paths for loading schema from local paths and installed packages AR-3#439
Minister944 wants to merge 2 commits into
mainfrom
AR-3-local-schema-external-package-resolution

Conversation

@Minister944

@Minister944 Minister944 commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Introduce a new schema_paths setting that builds the GraphQL schema from
multiple sources. Each entry is resolved either as a dotted Python attribute
path (e.g. pkg.SCHEMA_DIR or pkg.get_schema_files) - useful for pulling
type definitions from installed packages - or as a local file/directory path.

  • schema.py: add resolve_schema_paths and get_graphql_schema_from_paths
  • main.py: wire schema_paths into both client and graphqlschema strategies
  • settings.py: add the schema_paths field and make the three schema sources
    (schema_path, schema_paths, remote_schema_url) mutually exclusive -
    providing more than one now raises InvalidConfiguration; simplify
    using_remote_schema accordingly
  • docs/README: document schema_paths and the mutual-exclusivity rule

CI/CD does not pass. This is an unrelated error that is being fixed as part of AR-6

Acknowledgements

While working on this, we noticed #431 by @esfomeado, which also tackled
loading the schema from more than one source. After discussing it as a team,
we went with a different approach - a dedicated schema_paths setting that
additionally resolves dotted Python attribute paths from installed packages -
which we felt fit the project better. Thanks @esfomeado for raising the problem
and for your contribution! 🙏

Co-authored-by: esfomeado 1906254+esfomeado@users.noreply.github.com

…led packages

Introduce a new `schema_paths` setting that builds the GraphQL schema from
multiple sources. Each entry is resolved either as a dotted Python attribute
path (e.g. `pkg.SCHEMA_DIR` or `pkg.get_schema_files`) — useful for pulling
type definitions from installed packages — or as a local file/directory path.

- schema.py: add `resolve_schema_paths` and `get_graphql_schema_from_paths`
- main.py: wire `schema_paths` into both `client` and `graphqlschema` strategies
- settings.py: add the `schema_paths` field and make the three schema sources
  (`schema_path`, `schema_paths`, `remote_schema_url`) mutually exclusive —
  providing more than one now raises InvalidConfiguration; simplify
  `using_remote_schema` accordingly
- docs/README: document `schema_paths` and the mutual-exclusivity rule
@coderabbitai

coderabbitai Bot commented Jun 28, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a8e4f492-3b57-4d66-a07f-6cf2171d8bb1

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 AR-3-local-schema-external-package-resolution

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant