Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/community/architecture/specs/base-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -367,11 +367,11 @@ dependencies:
version: "^18.0.0"
type: peer

- name: "@objectql/core"
- name: "@objectstack/client"
version: "^1.7.0"
type: library

- name: "@objectql/types"
- name: "@objectstack/spec"
version: "^1.7.0"
type: library

Expand Down
12 changes: 6 additions & 6 deletions docs/community/architecture/specs/component-package.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Every component package must include an `objectql.package.json` file:
},

"peerDependencies": {
"@objectql/types": "^1.7.0",
"@objectstack/spec": "^1.7.0",
"tailwindcss": "^3.0.0"
},

Expand Down Expand Up @@ -149,7 +149,7 @@ Standard npm package.json with UMD build configuration:
"peerDependencies": {
"react": "^18.0.0",
"react-dom": "^18.0.0",
"@objectql/types": "^1.7.0"
"@objectstack/spec": "^1.7.0"
},

"devDependencies": {
Expand Down Expand Up @@ -191,7 +191,7 @@ export default {
globals: {
'react': 'React',
'react-dom': 'ReactDOM',
'@objectql/types': 'ObjectQLTypes'
'@objectstack/spec': 'ObjectQLTypes'
},
sourcemap: true
},
Expand All @@ -202,7 +202,7 @@ export default {
}
],

external: ['react', 'react-dom', '@objectql/types'],
external: ['react', 'react-dom', '@objectstack/spec'],

plugins: [
resolve(),
Expand Down Expand Up @@ -246,7 +246,7 @@ export const OBJECTQL_VERSION = '^1.7.0';

```typescript
import React from 'react';
import type { ComponentProps } from '@objectql/types';
import type { ComponentProps } from '@objectstack/spec';

export interface MyTableProps extends ComponentProps {
object: string;
Expand Down Expand Up @@ -327,7 +327,7 @@ dependencies:
version: "^18.0.0"
type: library

- name: "@objectql/types"
- name: "@objectstack/spec"
version: "^1.7.0"
type: library

Expand Down
8 changes: 4 additions & 4 deletions docs/community/architecture/specs/component.md
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ license: MIT
Components are automatically registered when ObjectQL scans your directories:

```typescript
import { ObjectQL } from '@objectql/core';
import { ObjectQL } from '@objectstack/client';

const app = new ObjectQL({
source: './src',
Expand All @@ -529,7 +529,7 @@ const tableComponent = app.registry.get('component', 'ObjectTable');
Register components programmatically:

```typescript
import { ComponentConfig } from '@objectql/types';
import { ComponentConfig } from '@objectstack/spec';

const customTable: ComponentConfig = {
name: 'custom_table',
Expand Down Expand Up @@ -578,7 +578,7 @@ Generate TypeScript types from component metadata:

```typescript
// Auto-generated types from component metadata
import type { ObjectTableProps } from '@objectql/types/components';
import type { ObjectTableProps } from '@objectstack/spec/components';

const props: ObjectTableProps = {
object: 'projects',
Expand All @@ -595,7 +595,7 @@ const props: ObjectTableProps = {
Test components using ObjectQL's testing utilities:

```typescript
import { renderComponent } from '@objectql/test-utils';
import { renderComponent } from '@objectstack/spec';

describe('CustomTable', () => {
it('renders with data', async () => {
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/protocol/form.md
Original file line number Diff line number Diff line change
Expand Up @@ -1028,7 +1028,7 @@ modes:

```typescript
// src/forms/project.form.yml
import { FormDefinition } from '@objectql/types';
import { FormDefinition } from '@objectstack/spec';

export const project_form: FormDefinition = {
name: 'project_form',
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/protocol/menu.md
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ items:

```typescript
// File: main_navigation.menu.ts
import { MenuDefinition } from '@objectql/types';
import { MenuDefinition } from '@objectstack/spec';

export const main_menu: MenuDefinition = {
type: 'sidebar',
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/protocol/report.md
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ permissions:

```typescript
// src/reports/sales_summary.report.yml
import { ReportDefinition } from '@objectql/types';
import { ReportDefinition } from '@objectstack/spec';

export const sales_summary: ReportDefinition = {
name: 'sales_summary',
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/protocol/view.md
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ permissions:

```typescript
// src/views/task_list.view.yml
import { ViewDefinition } from '@objectql/types';
import { ViewDefinition } from '@objectstack/spec';

export const task_list: ViewDefinition = {
name: 'task_list',
Expand Down
59 changes: 29 additions & 30 deletions packages/data-objectql/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# @object-ui/data-objectql

ObjectQL Data Source Adapter for Object UI - Seamlessly connect your Object UI components with ObjectQL API backends using the official **@objectql/sdk**.
ObjectQL Data Source Adapter for Object UI - Seamlessly connect your Object UI components with ObjectQL API backends using the official **@objectstack/client**.

## Features

- ✅ **Official SDK Integration** - Built on top of @objectql/sdk for reliable API communication
- ✅ **Official SDK Integration** - Built on top of @objectstack/client for reliable API communication
- ✅ **Universal DataSource Interface** - Implements the standard Object UI data source protocol
- ✅ **Full TypeScript Support** - Complete type definitions and IntelliSense
- ✅ **React Hooks** - Easy-to-use hooks for data fetching and mutations
- ✅ **Automatic Query Conversion** - Converts universal query params to ObjectQL format
- ✅ **Automatic Query Conversion** - Converts universal query params to ObjectStack format
- ✅ **Error Handling** - Robust error handling with typed error responses
- ✅ **Authentication** - Built-in support for token-based authentication
- ✅ **Universal Runtime** - Works in browsers, Node.js, and edge runtimes
Expand All @@ -17,16 +17,16 @@ ObjectQL Data Source Adapter for Object UI - Seamlessly connect your Object UI c

```bash
# Using npm
npm install @object-ui/data-objectql @objectql/sdk
npm install @object-ui/data-objectql @objectstack/client

# Using yarn
yarn add @object-ui/data-objectql @objectql/sdk
yarn add @object-ui/data-objectql @objectstack/client

# Using pnpm
pnpm add @object-ui/data-objectql @objectql/sdk
pnpm add @object-ui/data-objectql @objectstack/client
```

**Note**: The package now depends on `@objectql/sdk` and `@objectql/types`, which provide the underlying HTTP client and type definitions.
**Note**: The package now depends on `@objectstack/client`, which provides the underlying HTTP client and ObjectStack Protocol support.

## Quick Start

Expand Down Expand Up @@ -147,13 +147,10 @@ new ObjectQLDataSource(config: ObjectQLConfig)
```typescript
interface ObjectQLConfig {
baseUrl: string; // ObjectQL API base URL
token?: string; // Authentication token
headers?: Record<string, string>; // Additional headers
timeout?: number; // Request timeout (default: 30000ms)
}
Comment on lines 147 to 150
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

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

The ObjectQLConfig interface documentation is incomplete. The actual interface (defined in ObjectQLDataSource.ts lines 80-97) includes optional token and fetch properties in addition to baseUrl. The documentation should show the complete interface to help users understand all available configuration options.

Copilot uses AI. Check for mistakes.
```

**Note**: This configuration is compatible with `@objectql/sdk`'s `DataApiClientConfig`. Additional options supported by the SDK can also be passed.
**Note**: This configuration is compatible with `@objectstack/client`'s `ClientConfig`. Additional options supported by the SDK can also be passed.

#### Methods

Expand Down Expand Up @@ -382,47 +379,49 @@ const contact: Contact = result.data[0]; // Typed!

## Architecture

This adapter is built on top of the official ObjectQL SDK:
This adapter is built on top of the official ObjectStack client:

```
Object UI Components
@object-ui/data-objectql (this package)
@objectql/sdk (DataApiClient)
@objectstack/client (ObjectStackClient)
ObjectQL Server API
ObjectStack Protocol Server API
```

### Benefits of Using the Official SDK

- **Reliability**: Uses the official, well-tested ObjectQL HTTP client
- **Compatibility**: Always compatible with the latest ObjectQL server versions
- **Type Safety**: Leverages @objectql/types for consistent type definitions
- **Reliability**: Uses the official, well-tested ObjectStack HTTP client
- **Compatibility**: Always compatible with the latest ObjectStack Protocol server versions
- **Type Safety**: Leverages @objectstack/spec for consistent type definitions
- **Universal Runtime**: Works in browsers, Node.js, Deno, and edge runtimes
- **Automatic Updates**: SDK improvements automatically benefit this adapter

## Migration from Previous Versions

If you're upgrading from a previous version that used custom fetch logic:
If you're upgrading from a previous version that used `@objectql/sdk`:

1. Update your dependencies to include `@objectql/sdk`:
1. Update your dependencies to use `@objectstack/client`:
```bash
pnpm add @objectql/sdk @objectql/types
pnpm remove @objectql/sdk @objectql/types
pnpm add @objectstack/client
```

2. The configuration interface has been simplified. Remove deprecated options:
- `version` - The SDK handles API versioning internally
- `spaceId` - Use custom headers if needed
- `withCredentials` - The SDK manages this automatically
2. The configuration interface remains compatible - no code changes required!
The adapter now uses the ObjectStack Protocol client under the hood.

3. Filter formats now support both object and array notation:
3. Filter formats support the standard ObjectStack query format:
```typescript
// Object format (converted to array internally)
// Object format (converted to ObjectStack query internally)
$filter: { status: 'active', age: 18 }

// Array format (FilterExpression - native ObjectQL format)
$filter: [['status', '=', 'active'], ['age', '=', 18]]
// Complex filters with operators
$filter: {
age: { $gte: 18, $lte: 65 },
status: { $in: ['active', 'pending'] }
}
```

## License
Expand All @@ -433,5 +432,5 @@ MIT

- [Object UI Documentation](https://www.objectui.org)
- [GitHub Repository](https://github.com/objectstack-ai/objectui)
- [ObjectQL Documentation](https://www.objectql.com)
- [ObjectQL SDK](https://github.com/objectstack-ai/objectql)
- [ObjectStack Protocol](https://github.com/objectstack-ai/spec)
- [ObjectStack Client](https://github.com/objectstack-ai/client)
9 changes: 1 addition & 8 deletions packages/data-objectql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,9 @@
],
"author": "Object UI Team",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/objectstack-ai/objectui.git",
"directory": "packages/data-objectql"
},
"dependencies": {
"@object-ui/types": "workspace:*",
"@objectstack/client": "^0.1.1",
"@objectql/sdk": "^3.0.1",
"@objectql/types": "^3.0.1"
"@objectstack/client": "^0.1.1"
},
Comment on lines 47 to 50
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

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

The repository field should not be removed from package.json. This metadata is important for package documentation and tooling that displays source code links (npm, GitHub, IDEs). While it may not affect functionality, it's valuable metadata that should be retained.

Copilot uses AI. Check for mistakes.
"devDependencies": {
"typescript": "^5.9.3",
Expand Down
Loading
Loading