Skip to content

Commit d090bb1

Browse files
committed
Rename @objectql/express to @objectql/api and add auth package
Renames the @objectql/express package to @objectql/api across documentation, example apps, and package files. Adds a new @objectql/auth package with an adapter for better-auth and schema definitions for user, session, account, and verification models.
1 parent 5540f1c commit d090bb1

14 files changed

Lines changed: 218 additions & 6 deletions

File tree

docs/REST_API.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# REST API Reference
22

3-
The `@objectql/express` package provides a ready-to-use REST API middleware that exposes your ObjectQL resources over HTTP.
3+
The `@objectql/api` package provides a ready-to-use REST API middleware that exposes your ObjectQL resources over HTTP.
44

55
## Installation
66

77
```bash
8-
yarn add @objectql/express
8+
yarn add @objectql/api
99
```
1010

1111
## Setup
@@ -14,7 +14,7 @@ Integrate the API router into your Express application.
1414

1515
```typescript
1616
import express from 'express';
17-
import { createObjectQLRouter } from '@objectql/express';
17+
import { createObjectQLRouter } from '@objectql/api';
1818
import { objectql } from './my-objectql-instance';
1919

2020
const app = express();

examples/apps/express/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"@objectql/core": "^0.1.0",
1212
"@objectql/driver-knex": "^0.1.0",
1313
"@objectql/driver-mongo": "^0.1.0",
14-
"@objectql/express": "^0.1.0",
14+
"@objectql/api": "^0.1.0",
1515
"@objectql/admin": "*",
1616
"@example/project-management": "*",
1717
"cors": "^2.8.5",

examples/apps/express/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { ObjectQL, ObjectConfig, UnifiedQuery } from '@objectql/core';
2-
import { createObjectQLRouter } from '@objectql/express';
2+
import { createObjectQLRouter } from '@objectql/api';
33
import { createObjectQLAdmin } from '@objectql/admin';
44
import express from 'express';
55
import cors from 'cors';
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@objectql/express",
2+
"name": "@objectql/api",
33
"version": "0.1.0",
44
"main": "dist/index.js",
55
"types": "dist/index.d.ts",

packages/auth/package.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"name": "@objectql/auth",
3+
"version": "0.1.0",
4+
"main": "dist/index.js",
5+
"types": "dist/index.d.ts",
6+
"files": [
7+
"dist"
8+
],
9+
"scripts": {
10+
"build": "tsc"
11+
},
12+
"dependencies": {
13+
"better-auth": "^1.1.0"
14+
},
15+
"peerDependencies": {
16+
"@objectql/core": "^0.1.0"
17+
},
18+
"devDependencies": {
19+
"@objectql/core": "^0.1.0",
20+
"typescript": "^5.3.0"
21+
}
22+
}

0 commit comments

Comments
 (0)