Add introspection parameters to available settings.#413
Add introspection parameters to available settings.#413DamianCzajkowski merged 3 commits intomirumee:mainfrom
Conversation
- Refactor logic unpacking response from endpoint to access errors. - Add tests for settings and schema to cover new parameters. - Update README to include new parameters.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThis pull request introduces a new introspection settings system for GraphQL remote schema fetching. It adds configuration options to customize introspection query behavior, propagates these settings through the codebase from main entry points to schema fetching logic, and includes comprehensive tests and documentation. Changes
Sequence Diagram(s)sequenceDiagram
participant Config as Settings
participant Main as main.py
participant SchemaUtil as schema.py
participant Introspect as Introspection Query
participant Remote as Remote Schema
Config->>Config: Parse introspection_<br/>settings (6 flags)
Config->>Main: Provide IntrospectionSettings
Main->>SchemaUtil: Call get_graphql_schema_<br/>from_url with settings
SchemaUtil->>SchemaUtil: Create IntrospectionSettings<br/>(from param or default)
SchemaUtil->>Introspect: introspect_remote_schema<br/>with settings
Introspect->>Introspect: Build query from<br/>asdict(settings)
Introspect->>Remote: POST introspection query<br/>with custom options
Remote-->>Introspect: JSON introspection result
Introspect-->>SchemaUtil: Parsed schema
SchemaUtil-->>Main: GraphQLSchema
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan for PR comments
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. Comment |
|
@DamianCzajkowski how do you feel about this PR? Would love to get this merged so I can abandon using a different dependency to download our schema. Thanks! |
Hi all,
This PR exposes all available
graphql.get_introspection_queryoptions as configurable settings in the TOML configuration.While implementing this, I identified a small bug in
schema.introspect_remote_schema:GraphQL errors were not being surfaced if the response did not include a data key. This became apparent when testing introspection against our GraphQL endpoint, which does not support
schema_description. The server returned errors, but they were silently ignored.Summary by CodeRabbit
New Features
Documentation
Tests