quickslice#
GraphQL API for AT Protocol records with automatic schema generation from Lexicon definitions.
Work in progress. APIs subject to change.
Features#
- Automatic GraphQL schema generation from AT Protocol Lexicons
- Relay-compliant cursor-based pagination
- Real-time ingestion via Jetstream
- Backfill support for historical data
- SQLite storage
Example#
The status lexicon (xyz.statusphere.status):
{
"lexicon": 1,
"id": "xyz.statusphere.status",
"defs": {
"main": {
"type": "record",
"key": "tid",
"record": {
"type": "object",
"required": ["status", "createdAt"],
"properties": {
"status": {
"type": "string",
"minLength": 1,
"maxGraphemes": 1,
"maxLength": 32
},
"createdAt": { "type": "string", "format": "datetime" }
}
}
}
}
}
Querying the status records:
query {
xyzStatusphereStatus(
first: 50
sortBy: [
{ field: "createdAt", direction: DESC }
]
where: {
status: { contains: "👍" }
}
) {
edges {
node {
uri
did
status
createdAt
}
cursor
}
pageInfo {
hasNextPage
endCursor
}
}
}
Documentation#
Architecture#
lexicon_graphql/- Schema generation from Lexiconsserver/- Database layer and record storage