Search integration
For a custom Studio interface, use the exported useSearch(projectId, searchRequest) hook inside the Studio context. It uses the signed-in application’s search path and maps results into the active data scope.
Hook contract
The hook returns results, error, and isLoading. Pass null or an empty query when no search should run. The request groups the selected collections in searchRequests.searches and query parameters in commonParams.
Results include _id, _entityName, _entityNamePlural, and mapped attribute values. Use these identifiers to open the correct record, not a display label alone. Handle loading, errors, and no matches separately.
Configuration and access
Search depends on searchable attributes, deployed schema, and the signed-in context. The search route’s session flow differs from a generic bearer-token GraphQL client; do not assume every project API endpoint accepts the same credential.
For a server integration requiring predictable filters and selected fields, use GraphQL queries. Test space-restricted search behavior with the intended subject before using custom result rendering in a sensitive workflow.