Skip to content

Commit

Permalink
feat(capabilities): add capabilities on get one projection (#1221)
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaud-moncel authored Nov 28, 2024
1 parent baf2b7a commit 0909eaf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/agent/src/routes/capabilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export default class Capabilities extends BaseRoute {
nativeQueryConnections: Object.keys(this.dataSource.nativeQueryConnections).map(
connectionName => ({ name: connectionName }),
),
canUseProjectionOnGetOne: true,
collections:
collections?.map(collection => ({
name: collection.name,
Expand Down
4 changes: 4 additions & 0 deletions packages/agent/test/routes/capabilities.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ describe('Capabilities', () => {

expect(context.response.body).toEqual({
nativeQueryConnections: [{ name: 'main' }, { name: 'replica' }],
canUseProjectionOnGetOne: true,
collections: [],
});
});
Expand All @@ -86,6 +87,7 @@ describe('Capabilities', () => {

expect(context.response.body).toEqual({
nativeQueryConnections: [],
canUseProjectionOnGetOne: true,
collections: [],
});
});
Expand All @@ -102,6 +104,7 @@ describe('Capabilities', () => {

expect(context.response.body).toEqual({
nativeQueryConnections: [],
canUseProjectionOnGetOne: true,
collections: [],
});
});
Expand All @@ -120,6 +123,7 @@ describe('Capabilities', () => {

expect(context.response.body).toEqual({
nativeQueryConnections: [],
canUseProjectionOnGetOne: true,
collections: [
{
name: 'books',
Expand Down

0 comments on commit 0909eaf

Please sign in to comment.