AI-Generated Content Warning: This documentation contains AI-generated content. Verify information before depending on it for decision making.
GraphDone provides a comprehensive GraphQL API for all data operations. The API supports queries, mutations, and real-time subscriptions.
http://localhost:4127/graphql
Currently using a demo authentication system. In production, include your JWT token in the Authorization header:
Authorization: Bearer <your-jwt-token>
Represents a work item in the graph.
type Node {
id: ID!
type: NodeType!
title: String!
description: String
position: SphericalCoordinate!
priority: Priority!
status: NodeStatus!
contributors: [NodeContributor!]!
dependencies: [Node!]!
dependents: [Node!]!
edges: [Edge!]!
metadata: JSON
createdAt: DateTime!
updatedAt: DateTime!
}
enum NodeType {
OUTCOME
TASK
MILESTONE
IDEA
}
enum NodeStatus {
PROPOSED
ACTIVE
IN_PROGRESS
BLOCKED
COMPLETED
ARCHIVED
}Multi-dimensional priority system.
type Priority {
executive: Float! # Strategic priority (0-1)
individual: Float! # Personal priority (0-1)
community: Float! # Community validation (0-1)
computed: Float! # Weighted combination (0-1)
}Represents relationships between nodes.
type Edge {
id: ID!
source: Node!
target: Node!
type: EdgeType!
weight: Float!
metadata: JSON
createdAt: DateTime!
}
enum EdgeType {
DEPENDENCY
BLOCKS
RELATES_TO
CONTAINS
}query GetNodes {
nodes {
id
title
type
status
priority {
computed
}
position {
radius
theta
phi
}
}
}query GetNodeWithDeps($id: ID!) {
node(id: $id) {
id
title
description
type
status
dependencies {
id
title
type
}
dependents {
id
title
type
}
contributors {
contributor {
name
type
}
}
}
}query HighPriorityNodes {
nodes(priorityThreshold: 0.7) {
id
title
priority {
computed
}
}
}query GraphStats {
graphStats {
nodeCount
edgeCount
avgPriority
cycleCount
}
}mutation CreateNode($input: CreateNodeInput!) {
createNode(input: $input) {
id
title
type
priority {
computed
}
position {
radius
}
}
}Variables:
{
"input": {
"type": "TASK",
"title": "Implement user authentication",
"description": "Add secure login and registration",
"priority": {
"executive": 0.8,
"individual": 0.6,
"community": 0.4
}
}
}mutation UpdatePriority($id: ID!, $priority: PriorityInput!) {
updateNodePriority(id: $id, priority: $priority) {
id
priority {
executive
individual
community
computed
}
position {
radius
}
}
}mutation BoostNode($id: ID!, $boost: Float!) {
boostNodePriority(id: $id, boost: $boost) {
id
priority {
community
computed
}
}
}mutation CreateDependency($input: CreateEdgeInput!) {
createEdge(input: $input) {
id
source {
title
}
target {
title
}
type
}
}Variables:
{
"input": {
"sourceId": "node-1-id",
"targetId": "node-2-id",
"type": "DEPENDENCY",
"weight": 1.0
}
}subscription NodeUpdates {
nodeUpdated {
id
title
status
priority {
computed
}
}
}subscription PriorityChanges {
priorityChanged {
nodeId
oldPriority {
computed
}
newPriority {
computed
}
}
}The API returns standard GraphQL errors:
{
"errors": [
{
"message": "Node not found",
"locations": [{"line": 2, "column": 3}],
"path": ["node"],
"extensions": {
"code": "NOT_FOUND",
"nodeId": "invalid-id"
}
}
],
"data": {
"node": null
}
}Common error codes:
NOT_FOUND- Resource doesn't existVALIDATION_ERROR- Invalid input dataUNAUTHORIZED- Authentication requiredFORBIDDEN- Insufficient permissions
The API implements rate limiting:
- 100 requests/minute for queries
- 50 requests/minute for mutations
- Unlimited for subscriptions
Headers included in responses:
X-RateLimit-Limit- Maximum requests allowedX-RateLimit-Remaining- Requests remaining in windowX-RateLimit-Reset- Time when limit resets
# Create a new outcome
mutation {
outcome: createNode(input: {
type: OUTCOME
title: "Launch MVP"
description: "Release minimum viable product"
priority: { executive: 0.9, individual: 0.8, community: 0.0 }
}) {
id
}
}
# Create dependent task
mutation {
task: createNode(input: {
type: TASK
title: "User testing"
description: "Conduct user acceptance testing"
priority: { executive: 0.7, individual: 0.6, community: 0.0 }
}) {
id
}
}
# Create dependency relationship
mutation {
createEdge(input: {
sourceId: "outcome-id"
targetId: "task-id"
type: DEPENDENCY
}) {
id
}
}
# Boost task priority through community validation
mutation {
boostNodePriority(id: "task-id", boost: 0.2) {
priority {
computed
}
}
}For more examples, see the Examples directory.
Visit http://localhost:4000/graphql in your browser to access the GraphQL Playground for interactive exploration and testing.