
Hooks Objects
- 2 installs
- 52 repo stars
- Updated August 5, 2026
- constructive-io/constructive
React Query hooks for the objects API providing typed query and mutation hooks for 5 tables and 4 custom operations.
About
hooksobjects React Query hooks for the objects API provide typed query and mutation hooks for 5 tables and 4 custom operations.. Enables frontend access to object endpoints.
- Typed hooks for object entities
- React Query integration for objects API
Hooks Objects by the numbers
- 2 all-time installs (skills.sh)
- Ranked #1,862 of 2,245 Frontend Development skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/constructive-io/constructive --skill hooks-objectsAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 2 |
|---|---|
| repo stars | ★ 52 |
| Last updated | August 5, 2026 |
| Repository | constructive-io/constructive ↗ |
What it does
React Query hooks for the objects API providing typed query and mutation hooks for 5 tables and 4 custom operations.
Files
hooks-objects
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
React Query hooks for the objects API — provides typed query and mutation hooks for 5 tables and 4 custom operations
Usage
// Import hooks
import { useGetAllQuery } from './hooks';
// Query hooks: use<Model>Query, use<Model>sQuery
// Mutation hooks: useCreate<Model>Mutation, useUpdate<Model>Mutation, useDelete<Model>Mutation
// Bulk mutation hooks (when enabled): useBulkCreate<Model>Mutation, useBulkUpsert<Model>Mutation, etc.
const { data, isLoading } = useGetAllQuery({
selection: { fields: { id: true } },
});Examples
Query records
const { data, isLoading } = useGetAllQuery({
selection: { fields: { id: true } },
});References
See the references/ directory for detailed per-entity API documentation:
- get-all-record
- ref
- store
- object
- commit
- init-empty-repo
- set-data-at-path
- insert-node-at-path
- provision-bucket
commit
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Commit history — each commit snapshots a tree root for a store
Usage
useCommitsQuery({ selection: { fields: { id: true, message: true, databaseId: true, storeId: true, parentIds: true, authorId: true, committerId: true, treeId: true, date: true } } })
useCommitQuery({ id: '<UUID>', selection: { fields: { id: true, message: true, databaseId: true, storeId: true, parentIds: true, authorId: true, committerId: true, treeId: true, date: true } } })
useCreateCommitMutation({ selection: { fields: { id: true } } })
useUpdateCommitMutation({ selection: { fields: { id: true } } })
useDeleteCommitMutation({})Examples
List all commits
const { data, isLoading } = useCommitsQuery({
selection: { fields: { id: true, message: true, databaseId: true, storeId: true, parentIds: true, authorId: true, committerId: true, treeId: true, date: true } },
});Create a commit
const { mutate } = useCreateCommitMutation({
selection: { fields: { id: true } },
});
mutate({ message: '<String>', databaseId: '<UUID>', storeId: '<UUID>', parentIds: '<UUID>', authorId: '<UUID>', committerId: '<UUID>', treeId: '<UUID>', date: '<Datetime>' });confirmUpload
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Confirm that a file has been uploaded to S3. Verifies the object exists in S3, checks content-type, and transitions the file status from 'pending' to 'ready'.
Usage
const { mutate } = useConfirmUploadMutation(); mutate({ input: { fileId: '<UUID>' } });Examples
Use useConfirmUploadMutation
const { mutate, isLoading } = useConfirmUploadMutation();
mutate({ input: { fileId: '<UUID>' } });freezeObjects
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
React Query mutation hook for freezeObjects
Usage
const { mutate } = useFreezeObjectsMutation(); mutate({ input: { databaseId: '<UUID>', id: '<UUID>' } });Examples
Use useFreezeObjectsMutation
const { mutate, isLoading } = useFreezeObjectsMutation();
mutate({ input: { databaseId: '<UUID>', id: '<UUID>' } });getAllObjectsFromRoot
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Reads and enables pagination through a set of Object.
Usage
useGetAllObjectsFromRootQuery({ databaseId: '<UUID>', id: '<UUID>', first: '<Int>', offset: '<Int>', after: '<Cursor>' })Examples
Use useGetAllObjectsFromRootQuery
const { data, isLoading } = useGetAllObjectsFromRootQuery({ databaseId: '<UUID>', id: '<UUID>', first: '<Int>', offset: '<Int>', after: '<Cursor>' });getAllRecord
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
React Query hooks for GetAllRecord data operations
Usage
useGetAllQuery({ selection: { fields: { path: true, data: true } } })
useCreateGetAllRecordMutation({ selection: { fields: { id: true } } })Examples
List all getAll
const { data, isLoading } = useGetAllQuery({
selection: { fields: { path: true, data: true } },
});Create a getAllRecord
const { mutate } = useCreateGetAllRecordMutation({
selection: { fields: { id: true } },
});
mutate({ path: '<String>', data: '<JSON>' });getObjectAtPath
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
React Query query hook for getObjectAtPath
Usage
useGetObjectAtPathQuery({ dbId: '<UUID>', storeId: '<UUID>', path: '<String>', refname: '<String>' })Examples
Use useGetObjectAtPathQuery
const { data, isLoading } = useGetObjectAtPathQuery({ dbId: '<UUID>', storeId: '<UUID>', path: '<String>', refname: '<String>' });getPathObjectsFromRoot
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Reads and enables pagination through a set of Object.
Usage
useGetPathObjectsFromRootQuery({ databaseId: '<UUID>', id: '<UUID>', path: '<String>', first: '<Int>', offset: '<Int>', after: '<Cursor>' })Examples
Use useGetPathObjectsFromRootQuery
const { data, isLoading } = useGetPathObjectsFromRootQuery({ databaseId: '<UUID>', id: '<UUID>', path: '<String>', first: '<Int>', offset: '<Int>', after: '<Cursor>' });initEmptyRepo
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
React Query mutation hook for initEmptyRepo
Usage
const { mutate } = useInitEmptyRepoMutation(); mutate({ input: { sId: '<UUID>', storeId: '<UUID>' } });Examples
Use useInitEmptyRepoMutation
const { mutate, isLoading } = useInitEmptyRepoMutation();
mutate({ input: { sId: '<UUID>', storeId: '<UUID>' } });insertNodeAtPath
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
React Query mutation hook for insertNodeAtPath
Usage
const { mutate } = useInsertNodeAtPathMutation(); mutate({ input: '<InsertNodeAtPathInput>' });Examples
Use useInsertNodeAtPathMutation
const { mutate, isLoading } = useInsertNodeAtPathMutation();
mutate({ input: '<InsertNodeAtPathInput>' });object
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Content-addressed Merkle tree objects keyed by UUID v5 hash of data + children
Usage
useObjectsQuery({ selection: { fields: { id: true, databaseId: true, kids: true, ktree: true, data: true, createdAt: true } } })
useObjectQuery({ id: '<UUID>', selection: { fields: { id: true, databaseId: true, kids: true, ktree: true, data: true, createdAt: true } } })
useCreateObjectMutation({ selection: { fields: { id: true } } })
useUpdateObjectMutation({ selection: { fields: { id: true } } })
useDeleteObjectMutation({})Examples
List all objects
const { data, isLoading } = useObjectsQuery({
selection: { fields: { id: true, databaseId: true, kids: true, ktree: true, data: true, createdAt: true } },
});Create a object
const { mutate } = useCreateObjectMutation({
selection: { fields: { id: true } },
});
mutate({ databaseId: '<UUID>', kids: '<UUID>', ktree: '<String>', data: '<JSON>' });provisionBucket
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Provision an S3 bucket for a logical bucket in the database. Reads the bucket config via RLS, then creates and configures the S3 bucket with the appropriate privacy policies, CORS rules, and lifecycle settings.
Usage
const { mutate } = useProvisionBucketMutation(); mutate({ input: { bucketKey: '<String>', ownerId: '<UUID>' } });Examples
Use useProvisionBucketMutation
const { mutate, isLoading } = useProvisionBucketMutation();
mutate({ input: { bucketKey: '<String>', ownerId: '<UUID>' } });ref
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Branch heads — mutable pointers into the commit chain
Usage
useRefsQuery({ selection: { fields: { id: true, name: true, databaseId: true, storeId: true, commitId: true } } })
useRefQuery({ id: '<UUID>', selection: { fields: { id: true, name: true, databaseId: true, storeId: true, commitId: true } } })
useCreateRefMutation({ selection: { fields: { id: true } } })
useUpdateRefMutation({ selection: { fields: { id: true } } })
useDeleteRefMutation({})Examples
List all refs
const { data, isLoading } = useRefsQuery({
selection: { fields: { id: true, name: true, databaseId: true, storeId: true, commitId: true } },
});Create a ref
const { mutate } = useCreateRefMutation({
selection: { fields: { id: true } },
});
mutate({ name: '<String>', databaseId: '<UUID>', storeId: '<UUID>', commitId: '<UUID>' });removeNodeAtPath
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
React Query mutation hook for removeNodeAtPath
Usage
const { mutate } = useRemoveNodeAtPathMutation(); mutate({ input: { dbId: '<UUID>', root: '<UUID>', path: '<String>' } });Examples
Use useRemoveNodeAtPathMutation
const { mutate, isLoading } = useRemoveNodeAtPathMutation();
mutate({ input: { dbId: '<UUID>', root: '<UUID>', path: '<String>' } });requestUploadUrl
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Request a presigned URL for uploading a file directly to S3. Client computes SHA-256 of the file content and provides it here. If a file with the same hash already exists (dedup), returns the existing file ID and deduplicated=true with no uploadUrl.
Usage
const { mutate } = useRequestUploadUrlMutation(); mutate({ input: '<RequestUploadUrlInput>' });Examples
Use useRequestUploadUrlMutation
const { mutate, isLoading } = useRequestUploadUrlMutation();
mutate({ input: '<RequestUploadUrlInput>' });revParse
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
React Query query hook for revParse
Usage
useRevParseQuery({ dbId: '<UUID>', storeId: '<UUID>', refname: '<String>' })Examples
Use useRevParseQuery
const { data, isLoading } = useRevParseQuery({ dbId: '<UUID>', storeId: '<UUID>', refname: '<String>' });setAndCommit
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
React Query mutation hook for setAndCommit
Usage
const { mutate } = useSetAndCommitMutation(); mutate({ input: '<SetAndCommitInput>' });Examples
Use useSetAndCommitMutation
const { mutate, isLoading } = useSetAndCommitMutation();
mutate({ input: '<SetAndCommitInput>' });setDataAtPath
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
React Query mutation hook for setDataAtPath
Usage
const { mutate } = useSetDataAtPathMutation(); mutate({ input: { sId: '<UUID>', root: '<UUID>', path: '<String>', data: '<JSON>' } });Examples
Use useSetDataAtPathMutation
const { mutate, isLoading } = useSetDataAtPathMutation();
mutate({ input: { sId: '<UUID>', root: '<UUID>', path: '<String>', data: '<JSON>' } });setPropsAndCommit
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
React Query mutation hook for setPropsAndCommit
Usage
const { mutate } = useSetPropsAndCommitMutation(); mutate({ input: { dbId: '<UUID>', storeId: '<UUID>', refname: '<String>', path: '<String>', data: '<JSON>' } });Examples
Use useSetPropsAndCommitMutation
const { mutate, isLoading } = useSetPropsAndCommitMutation();
mutate({ input: { dbId: '<UUID>', storeId: '<UUID>', refname: '<String>', path: '<String>', data: '<JSON>' } });store
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
Named stores — one per version-controlled tree (e.g. one graph, one definition set)
Usage
useStoresQuery({ selection: { fields: { id: true, name: true, databaseId: true, hash: true, createdAt: true } } })
useStoreQuery({ id: '<UUID>', selection: { fields: { id: true, name: true, databaseId: true, hash: true, createdAt: true } } })
useCreateStoreMutation({ selection: { fields: { id: true } } })
useUpdateStoreMutation({ selection: { fields: { id: true } } })
useDeleteStoreMutation({})Examples
List all stores
const { data, isLoading } = useStoresQuery({
selection: { fields: { id: true, name: true, databaseId: true, hash: true, createdAt: true } },
});Create a store
const { mutate } = useCreateStoreMutation({
selection: { fields: { id: true } },
});
mutate({ name: '<String>', databaseId: '<UUID>', hash: '<UUID>' });updateNodeAtPath
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
React Query mutation hook for updateNodeAtPath
Usage
const { mutate } = useUpdateNodeAtPathMutation(); mutate({ input: '<UpdateNodeAtPathInput>' });Examples
Use useUpdateNodeAtPathMutation
const { mutate, isLoading } = useUpdateNodeAtPathMutation();
mutate({ input: '<UpdateNodeAtPathInput>' });