
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
@standardbeagle/edit-db
Advanced tools
React GraphQL database editor with automatic form generation, validation, and data table components.
@standardbeagle/edit-db is a React component library for building database administration interfaces. Connect it to any GraphQL API—especially BifrostQL—and get a fully functional data editor with zero configuration.
Key features:
Install the package and its peer dependencies:
npm install @standardbeagle/edit-db @tanstack/react-query
yarn add @standardbeagle/edit-db @tanstack/react-query
pnpm add @standardbeagle/edit-db @tanstack/react-query
import { Editor } from '@standardbeagle/edit-db';
import '@standardbeagle/edit-db/style.css';
function App() {
return (
<Editor
uri="https://api.example.com/graphql"
uiPath="/admin"
/>
);
}
export default App;
import { Editor } from '@standardbeagle/edit-db';
import '@standardbeagle/edit-db/style.css';
function DatabaseAdmin() {
return (
<div className="h-screen">
<Editor
uri="/graphql"
uiPath="/admin"
onLocate={(path) => console.log('Navigation:', path)}
/>
</div>
);
}
For advanced use cases, provide a custom fetcher:
import { Editor, GraphQLFetcher } from '@standardbeagle/edit-db';
class CustomFetcher implements GraphQLFetcher {
async query<T>(query: string, variables?: Record<string, unknown>): Promise<T> {
const response = await fetch('/api/graphql', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${getAuthToken()}`,
},
body: JSON.stringify({ query, variables }),
});
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
const result = await response.json();
if (result.errors) {
throw new Error(result.errors[0].message);
}
return result.data;
}
}
function App() {
const fetcher = useMemo(() => new CustomFetcher(), []);
return <Editor fetcher={fetcher} uiPath="/admin" />;
}
Track user navigation for analytics or state management:
function App() {
const [currentPath, setCurrentPath] = useState('');
return (
<>
<nav>Current: {currentPath}</nav>
<Editor
uri="/graphql"
uiPath="/admin"
onLocate={setCurrentPath}
/>
</>
);
}
| Prop | Type | Required | Description |
|---|---|---|---|
uri | string | Optional* | GraphQL endpoint URL |
fetcher | GraphQLFetcher | Optional* | Custom fetcher instance |
uiPath | string | Optional | Base path for routing (default: /) |
onLocate | (path: string) => void | Optional | Navigation callback |
*Either uri or fetcher is required.
The editor expects a BifrostQL-compatible schema with the _dbSchema query:
type Query {
_dbSchema: [DbSchemaItem!]!
}
type DbSchemaItem {
graphQlName: String!
dbName: String!
labelColumn: String!
primaryKeys: [String!]!
isEditable: Boolean!
metadata: [MetadataItem!]!
columns: [DbColumnItem!]!
multiJoins: [JoinItem!]!
singleJoins: [JoinItem!]!
}
type DbColumnItem {
graphQlName: String!
dbName: String!
paramType: String!
dbType: String!
isPrimaryKey: Boolean!
isIdentity: Boolean!
isNullable: Boolean!
isReadOnly: Boolean!
metadata: [MetadataItem!]!
# Optional validation metadata
maxLength: Int
minLength: Int
min: Float
max: Float
step: Float
pattern: String
patternMessage: String
inputType: String
defaultValue: String
enumValues: [String!]
enumLabels: [String!]
}
<Editor />The root component that sets up React Query, schema context, and routing.
<MainFrame />Handles the application layout with sidebar navigation and main content area.
<DataPanel />Displays data tables with sorting, filtering, and pagination.
<DataEdit />Renders edit forms with automatic field generation based on schema metadata.
| Hook | Purpose |
|---|---|
useSchema() | Access database schema and table metadata |
useDataTable() | Manage table data, sorting, filtering, and pagination |
useTableMutation() | Handle insert, update, and delete operations |
useTableRef() | Fetch reference data for foreign key dropdowns |
usePath() | Client-side routing without page reloads |
useColumnNav() | Manage side panel navigation for related records |
Validation rules are automatically applied from schema metadata:
// Required fields
{ isNullable: false }
// String length
{ maxLength: 255, minLength: 1 }
// Numeric ranges
{ min: 0, max: 100, step: 1 }
// Pattern matching
{ pattern: '^[A-Z]{2}-\\d{4}$', patternMessage: 'Format: XX-0000' }
// Enum values
{ enumValues: ['active', 'inactive'], enumLabels: ['Active', 'Inactive'] }
The package uses Tailwind CSS for styling. Import the stylesheet:
import '@standardbeagle/edit-db/style.css';
For custom theming, override CSS variables:
:root {
--background: 0 0% 100%;
--foreground: 222.2 84% 4.9%;
--primary: 222.2 47.4% 11.2%;
--primary-foreground: 210 40% 98%;
/* ... */
}
Full TypeScript definitions are included:
import type {
EditorProps,
GraphQLFetcher,
Schema,
Table,
Column
} from '@standardbeagle/edit-db';
MIT © Standard Beagle
Contributions are welcome! Please see the main BifrostQL repository for contribution guidelines.
FAQs
Unknown package
The npm package @standardbeagle/edit-db receives a total of 8 weekly downloads. As such, @standardbeagle/edit-db popularity was classified as not popular.
We found that @standardbeagle/edit-db demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.