Tags: airbnb/viaduct
Tags
feat(viaduct): add TenantRuntimeModule for runtime schema access (AIR… …BNB) Introduces a new `TenantRuntimeModule` Guice module that provides tenant code with runtime access to registered Viaduct schemas via the `@RegisteredViaductSchemas` qualifier. This enables MCP tool resolvers (and other tenant-level code) to look up `ViaductSchema` instances by `SchemaId` without directly depending on internal Viaduct runtime classes. Key changes: - New `TenantRuntimeModule` in `common/viaduct/tenant/runtime/` with a request-scoped provider that exposes schemas as `Map<SchemaId, Lazy<ViaductSchema>>` - Exposed `engineRegistry` property on `MTDViaduct` and added `getRegisteredSchemaIds()` to `EngineRegistry` - Refactored `GetTypeResolver` and `SearchTypesResolver` to use constructor injection with the new schema map instead of accessing `ctx.schema` directly - Fixed package declaration in `SchemaScopeSetExtensions.kt` - Added unit tests for both `TenantRuntimeModule` and `GetTypeResolver` Github-Change-Id: 975842 GitOrigin-RevId: ea45154bdc8ac6b0d96a1d1f0ff1c6ddc00ec5bc
Fix nested object fetching and exception handling in `FieldResolver` … …(AIRBNB) Updates `FieldResolver` to return `Value<Unit>` from `fetchObject`, `fetchObjectSerially`, and `resolveField` instead of returning `Unit` or `Value<FieldResolutionResult>`. This ensures that the execution chain properly waits for all nested object and list fetching to complete before considering the parent operation finished. Refines exception handling in `FieldResolver` to ensure proper error bubbling: - `fetchObject` and `fetchObjectSerially` now allow fatal errors (those not swallowed by `executeField`) to bubble up by propagating exceptions caught in `recover`. - `executeField` continues to encapsulate `FieldFetchingException` and `InternalEngineException` (returning success for partial results). - `maybeFetchNestedObject` now waits for all list items to be fetched. Also updates `IViaductInstrumentation` and related classes to change the `beginFetchObject` return type to `InstrumentationContext<Unit>` to match the new `fetchObject` signature. Github-Change-Id: 967307 GitOrigin-RevId: acc8aca219f0052faf88908de65d2f66e3e09d60
Update variable validators to use areTypesCoercible (#217) Relaxes our validators for required selection set variables to require coercibility rather than strict compatibility. For now this only includes allowing non-list-types to be used where list types are expected, but may be augmented in the future. Github-Change-Id: 961908 GitOrigin-RevId: 3b6fee8c47d26f496c3a349f37b5f93f69360eba Co-authored-by: Aileen Chen <[email protected]>
Fix release.yml: use specific version of softprops/action-gh-release Change from @v2 to @v2.4.1 to comply with repository action policy. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
PreviousNext