Skip to content

fix: make entity query service folder-aware with routing context#1490

Open
UIPath-Harshit wants to merge 1 commit intomainfrom
fix/query-entity-folder-aware
Open

fix: make entity query service folder-aware with routing context#1490
UIPath-Harshit wants to merge 1 commit intomainfrom
fix/query-entity-folder-aware

Conversation

@UIPath-Harshit
Copy link
Contributor

@UIPath-Harshit UIPath-Harshit commented Mar 26, 2026

Summary

  • Add QueryRoutingContext and EntityRouting models to support multi-folder entity queries
  • Pass optional routing_context parameter through query_entity_records / query_entity_records_async to the query execution endpoint
  • When present, routingContext is included in the request body, allowing per-entity folder routing that takes precedence over the folder header

Test plan

  • Added unit tests for sync and async query with routing context
  • Added test verifying routingContext is omitted when not provided
  • Lint and format checks pass

🤖 Generated with Claude Code

@github-actions github-actions bot added the test:uipath-langchain Triggers tests in the uipath-langchain-python repository label Mar 26, 2026
@UIPath-Harshit UIPath-Harshit changed the title Made entity service folder aware fix: make entity query service folder-aware with routing context Mar 26, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds optional query routing context support to the Entities query-records API so multi-folder / multi-entity queries can be routed per entity via the request body.

Changes:

  • Introduces new routing models (EntityRouting, QueryRoutingContext) for per-entity folder routing.
  • Extends EntitiesService.query_entity_records and query_entity_records_async to accept an optional routing_context.
  • Updates request construction to serialize routingContext into the POST body when provided.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.

File Description
packages/uipath-platform/src/uipath/platform/entities/entities.py Adds Pydantic models representing routing context for query execution.
packages/uipath-platform/src/uipath/platform/entities/_entities_service.py Plumbs routing_context through public/internal APIs and serializes it into the query execute request body.
packages/uipath-platform/src/uipath/platform/entities/__init__.py Exposes the new routing models via package exports.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@UIPath-Harshit UIPath-Harshit force-pushed the fix/query-entity-folder-aware branch 3 times, most recently from 2de743f to 5691d8f Compare March 26, 2026 17:49
- Add QueryRoutingOverrideContext and EntityRouting models to support
  multi-folder entity queries
- Pass optional routing_context parameter through query_entity_records /
  query_entity_records_async to the query execution endpoint
- When present, routingContext is included in the request body, allowing
  per-entity folder routing that takes precedence over the folder header
- Add unit tests for sync and async query with routing context
- Bump uipath-platform version to 0.1.12

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@UIPath-Harshit UIPath-Harshit force-pushed the fix/query-entity-folder-aware branch from 5691d8f to 232bf65 Compare March 26, 2026 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:uipath-langchain Triggers tests in the uipath-langchain-python repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants