graphql-engine/dc-agents/sqlite/package.json
David Overton 9921823915 GDC-189 custom aggregations
>

## Description
->

This PR allows DC agents to define custom aggregate functions for their scalar types.

### Related Issues
->

GDC-189

### Solution and Design
>

We added a new property `aggregate_functions` to the scalar types capabilities. This allows the agent author to specify a set of aggregate functions supported by each scalar type, along with the function's result type.

During GraphQL schema generation, the custom aggregate functions are available via a new method `getCustomAggregateOperators` on the `Backend` type class.
Custom functions are merged with the builtin aggregate functions when building GraphQL schemas for table aggregate fields and for `order_by` operators on array relations.

### Steps to test and verify
>

• Codec tests for aggregate function capabilities have been added to the unit tests.
• Some custom aggregate operators have been added to the reference agent and are used in a new test in `api-tests`.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6199
GitOrigin-RevId: e9c0d1617af93847c1493671fdbb794f573bde0c
2022-10-27 00:44:06 +00:00

45 lines
1.3 KiB
JSON

{
"name": "@hasura/dc-agent-sqlite",
"version": "0.1.0",
"description": "SQLite Data Connector Agent for Hasura GraphQL Engine",
"author": "Hasura (https://github.com/hasura/graphql-engine)",
"license": "Apache-2.0",
"repository": {
"type": "git",
"url": "git+https://github.com/hasura/graphql-engine.git"
},
"bugs": {
"url": "https://github.com/hasura/graphql-engine/issues"
},
"homepage": "https://github.com/hasura/graphql-engine#readme",
"main": "dist/index.js",
"scripts": {
"build": "tsc",
"typecheck": "tsc --noEmit",
"start": "ts-node ./src/index.ts",
"start-no-typecheck": "ts-node --transpileOnly ./src/index.ts",
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"@fastify/cors": "^8.1.0",
"@hasura/dc-api-types": "0.13.0",
"fastify-metrics": "^9.2.1",
"fastify": "^4.4.0",
"nanoid": "^3.3.4",
"openapi3-ts": "^2.0.2",
"pino-pretty": "^8.1.0",
"sequelize": "^6.21.2",
"sqlite-parser": "^1.0.1",
"sqlite3": "^5.0.8",
"sqlstring-sqlite": "^0.1.1"
},
"devDependencies": {
"@tsconfig/node16": "^1.0.3",
"@types/node": "^16.11.49",
"@types/sqlite3": "^3.1.8",
"@types/xml2js": "^0.4.11",
"ts-node": "^10.9.1",
"typescript": "^4.7.4"
}
}