epress node GraphQL API
GraphQL is served under /api/graphql. This chapter documents all current queries and mutations with arguments, response schema, error codes, and implementation links.
epress world protocol
OpenCollapsed while browsing epress node docs.
epress node Developer Docs
GraphQL is served under /api/graphql. This chapter documents all current queries and mutations with arguments, response schema, error codes, and implementation links.
Click any operation to jump to its full reference.
| Method | Path / Operation | Scope | Auth | Summary |
|---|---|---|---|---|
| MUTATION | broadcastProfileUpdate(typedData: JSON!, signature: String!) | Public/App | Owner JWT + signature | Broadcast profile update over EWP. |
| MUTATION | confirmComment(id: ID, tokenOrSignature: String!): Comment! | Public/App | Public token/signature flow | Confirm pending comment. |
| MUTATION | confirmCommentDeletion(token: String!) | Public/App | Public token flow | Confirm deletion for email-auth comment. |
| MUTATION | createComment(input: CreateCommentInput!): Comment! | Public/App | Public | Create pending comment with EMAIL or ETHEREUM flow. |
| MUTATION | createConnection(typedData: JSON!, signature: String!) | Public/App | Owner JWT | Follow another node and establish connection. |
| MUTATION | createPublication(input: CreatePublicationInput!): Publication! | Public/App | Owner JWT + permission | Create publication record and content. |
| MUTATION | destroyComment(id: ID!, signature: String, email: String): Comment! | Public/App | Owner or commenter flow | Request comment deletion. |
| MUTATION | destroyConnection(typedData: JSON!, signature: String!) | Public/App | Owner JWT | Unfollow node and remove connection. |
| MUTATION | destroyPublication(id: ID!) | Public/App | Owner JWT + permission | Delete publication. |
| MUTATION | generateIntegrationToken(scope: [String!]!, expiresIn: String): String! | Public/App | Owner JWT | Create scoped integration token. |
| MUTATION | signInWithEthereum(message: String!, signature: String!): String! | Public/App | SIWE signature | Authenticate owner and issue JWT. |
| MUTATION | signPublication(id: ID!, signature: String!): Publication! | Public/App | Owner JWT + signature | Sign publication and trigger replication. |
| MUTATION | subscribeNotification(subscription: PushSubscriptionInput!) | Public/App | Owner JWT | Store web push subscription. |
| MUTATION | unsubscribeNotification(endpoint: String!) | Public/App | Owner JWT | Remove web push subscription. |
| MUTATION | updateProfile(input: UpdateProfileInput!) | Public/App | Owner JWT | Update node profile metadata and assets. |
| MUTATION | updatePublication(input: UpdatePublicationInput!): Publication! | Public/App | Owner JWT + permission | Update publication metadata. |
| MUTATION | updateSettings(input: UpdateSettingsInput!): Settings! | Public/App | Owner JWT | Update node settings transactionally. |
| QUERY | fetch(type: FetchType!, id: ID!) | Public/App | Permission aware | Generic fetch for NODE, PUBLICATION, COMMENT models. |
| QUERY | getSiweMessage(address: String!): String! | Public/App | None | Generate SIWE challenge with nonce JWT. |
| QUERY | nodeStatus | Public/App | None | Fetch node version and uptime start time. |
| QUERY | profile | Public/App | None | Fetch self profile metadata. |
| QUERY | search(type: SearchType!, filterBy: JSON, orderBy: String, first: Int, after: String, keyword: String) | Public/App | Permission aware | Search nodes, publications, and comments. |
| QUERY | settings: Settings | Public/App | Optional JWT | Fetch node settings with auth-aware sensitive fields. |
| QUERY | suggestions(query: String, type: String!, limit: Int) | Public/App | None | Get mention and hashtag suggestions. |
| QUERY | visitor(address: String!): Visitor | Public/App | None | Resolve relationship between self node and visitor node. |
Generic fetch for NODE, PUBLICATION, COMMENT models.
Auth
Permission aware
Params
Body
Response
Error Codes
Example
query FetchPublication($id: ID!) {
fetch(type: PUBLICATION, id: $id) {
... on Publication {
id
slug
description
signature
comment_count
created_at
updated_at
author {
address
url
title
}
content {
content_hash
type
body
}
}
}
}
# variables
{
"id": "1"
}Implementation reference: server/graphql/queries/fetch.mjs
Generate SIWE challenge with nonce JWT.
Auth
None
Params
Body
Response
Error Codes
Example
query GetSiweMessage($address: String!) {
getSiweMessage(address: $address)
}
# variables
{
"address": "0x0000000000000000000000000000000000000001"
}Implementation reference: server/graphql/queries/auth.mjs
Fetch node version and uptime start time.
Auth
None
Params
Body
Response
Error Codes
Example
query {
nodeStatus {
version
startedAt
}
}Implementation reference: server/graphql/queries/nodeStatus.mjs
Fetch self profile metadata.
Auth
None
Params
Body
Response
Error Codes
Example
query {
profile {
address
url
title
description
created_at
updated_at
}
}Implementation reference: server/graphql/queries/profile.mjs
Search nodes, publications, and comments.
Auth
Permission aware
Params
Body
Response
Error Codes
Example
query SearchPublications($filterBy: JSON, $first: Int, $after: String, $keyword: String) {
search(
type: PUBLICATION
filterBy: $filterBy
first: $first
after: $after
keyword: $keyword
) {
total
edges {
cursor
node {
... on Publication {
id
slug
description
signature
comment_count
created_at
updated_at
}
}
}
pageInfo {
hasNextPage
startCursor
endCursor
}
}
}
# variables
{
"filterBy": {
"hashtag": "web3"
},
"first": 10,
"after": null,
"keyword": "agent"
}Implementation reference: server/graphql/queries/search.mjs
Fetch node settings with auth-aware sensitive fields.
Auth
Optional JWT
Params
Body
Response
Error Codes
Example
query {
settings {
enableRSS
allowFollow
allowComment
defaultLanguage
defaultTheme
walletConnectProjectId
pwaAppName
mail {
enabled
mailTransport
mailFrom
}
vapidPublicKey
}
}Implementation reference: server/graphql/queries/settings.mjs
Get mention and hashtag suggestions.
Auth
None
Params
Body
Response
Error Codes
Example
query suggestionsExample($query: String, $type: String!, $limit: Int) {
suggestions(query: $query, type: $type, limit: $limit) {
id
label
type
address
url
hashtag
}
}
# variables
{
"query": "value",
"type": "value",
"limit": 1
}Implementation reference: server/graphql/queries/suggestion.mjs
Resolve relationship between self node and visitor node.
Auth
None
Params
Body
Response
Error Codes
Example
query Visitor($address: String!) {
visitor(address: $address) {
isFollower
isFollowing
node {
address
url
title
description
}
}
}
# variables
{
"address": "0x0000000000000000000000000000000000000001"
}Implementation reference: server/graphql/queries/visitor.mjs
Broadcast profile update over EWP.
Auth
Owner JWT + signature
Params
Body
Response
Error Codes
Example
mutation broadcastProfileUpdateExample($typedData: JSON!, $signature: String!) {
broadcastProfileUpdate(typedData: $typedData, signature: $signature)
}
# variables
{
"typedData": {},
"signature": "value"
}Implementation reference: server/graphql/mutations/profile.mjs
Confirm pending comment.
Auth
Public token/signature flow
Params
Body
Response
Error Codes
Example
mutation confirmCommentExample($id: ID, $tokenOrSignature: String!) {
confirmComment(id: $id, tokenOrSignature: $tokenOrSignature) {
id
publication_id
body
status
auth_type
author_name
author_id
credential
created_at
updated_at
}
}
# variables
{
"id": "1",
"tokenOrSignature": "value"
}Implementation reference: server/graphql/mutations/comment.mjs
Confirm deletion for email-auth comment.
Auth
Public token flow
Params
Body
Response
Error Codes
Example
mutation confirmCommentDeletionExample($token: String!) {
confirmCommentDeletion(token: $token) {
id
publication_id
body
status
auth_type
author_name
author_id
credential
created_at
updated_at
}
}
# variables
{
"token": "value"
}Implementation reference: server/graphql/mutations/comment.mjs
Create pending comment with EMAIL or ETHEREUM flow.
Auth
Public
Params
Body
Response
Error Codes
Example
mutation createCommentExample($input: CreateCommentInput!) {
createComment(input: $input) {
id
publication_id
body
status
auth_type
author_name
author_id
credential
created_at
updated_at
}
}
# variables
{
"input": {
"publication_id": "1",
"body": "value",
"author_name": "value",
"auth_type": "value",
"author_id": "value"
}
}Implementation reference: server/graphql/mutations/comment.mjs
Follow another node and establish connection.
Auth
Owner JWT
Params
Body
Response
Error Codes
Example
mutation createConnectionExample($typedData: JSON!, $signature: String!) {
createConnection(typedData: $typedData, signature: $signature) {
address
url
title
description
is_self
created_at
updated_at
}
}
# variables
{
"typedData": {},
"signature": "value"
}Implementation reference: server/graphql/mutations/connection.mjs
Create publication record and content.
Auth
Owner JWT + permission
Params
Body
Response
Error Codes
Example
mutation createPublicationExample($input: CreatePublicationInput!) {
createPublication(input: $input) {
id
content_hash
author_address
signature
comment_count
created_at
updated_at
description
slug
}
}
# variables
{
"input": {
"type": "value",
"body": "value",
"file": "value",
"description": "value",
"slug": "value"
}
}Implementation reference: server/graphql/mutations/publication.mjs
Request comment deletion.
Auth
Owner or commenter flow
Params
Body
Response
Error Codes
Example
mutation destroyCommentExample($id: ID!, $signature: String, $email: String) {
destroyComment(id: $id, signature: $signature, email: $email) {
id
publication_id
body
status
auth_type
author_name
author_id
credential
created_at
updated_at
}
}
# variables
{
"id": "1",
"signature": "value",
"email": "value"
}Implementation reference: server/graphql/mutations/comment.mjs
Unfollow node and remove connection.
Auth
Owner JWT
Params
Body
Response
Error Codes
Example
mutation destroyConnectionExample($typedData: JSON!, $signature: String!) {
destroyConnection(typedData: $typedData, signature: $signature) {
address
url
title
description
is_self
created_at
updated_at
}
}
# variables
{
"typedData": {},
"signature": "value"
}Implementation reference: server/graphql/mutations/connection.mjs
Delete publication.
Auth
Owner JWT + permission
Params
Body
Response
Error Codes
Example
mutation destroyPublicationExample($id: ID!) {
destroyPublication(id: $id) {
id
content_hash
author_address
signature
comment_count
created_at
updated_at
description
slug
}
}
# variables
{
"id": "1"
}Implementation reference: server/graphql/mutations/publication.mjs
Create scoped integration token.
Auth
Owner JWT
Params
Body
Response
Error Codes
Example
mutation generateIntegrationTokenExample($scope: [String]!, $expiresIn: String) {
generateIntegrationToken(scope: $scope, expiresIn: $expiresIn)
}
# variables
{
"scope": [],
"expiresIn": "value"
}Implementation reference: server/graphql/mutations/auth.mjs
Authenticate owner and issue JWT.
Auth
SIWE signature
Params
Body
Response
Error Codes
Example
mutation signInWithEthereumExample($message: String!, $signature: String!) {
signInWithEthereum(message: $message, signature: $signature)
}
# variables
{
"message": "value",
"signature": "value"
}Implementation reference: server/graphql/mutations/auth.mjs
Sign publication and trigger replication.
Auth
Owner JWT + signature
Params
Body
Response
Error Codes
Example
mutation signPublicationExample($id: ID!, $signature: String!) {
signPublication(id: $id, signature: $signature) {
id
content_hash
author_address
signature
comment_count
created_at
updated_at
description
slug
}
}
# variables
{
"id": "1",
"signature": "value"
}Implementation reference: server/graphql/mutations/publication.mjs
Store web push subscription.
Auth
Owner JWT
Params
Body
Response
Error Codes
Example
mutation subscribeNotificationExample($subscription: PushSubscriptionInput!) {
subscribeNotification(subscription: $subscription) {
success
message
}
}
# variables
{
"subscription": {
"endpoint": "value",
"keys": {
"p256dh": "value",
"auth": "value"
}
}
}Implementation reference: server/graphql/mutations/settings.mjs
Remove web push subscription.
Auth
Owner JWT
Params
Body
Response
Error Codes
Example
mutation unsubscribeNotificationExample($endpoint: String!) {
unsubscribeNotification(endpoint: $endpoint) {
success
message
}
}
# variables
{
"endpoint": "value"
}Implementation reference: server/graphql/mutations/settings.mjs
Update node profile metadata and assets.
Auth
Owner JWT
Params
Body
Response
Error Codes
Example
mutation updateProfileExample($input: UpdateProfileInput!) {
updateProfile(input: $input) {
address
url
title
description
created_at
updated_at
}
}
# variables
{
"input": {
"title": "value",
"description": "value",
"url": "value",
"avatar": "value",
"background": "value"
}
}Implementation reference: server/graphql/mutations/profile.mjs
Update publication metadata.
Auth
Owner JWT + permission
Params
Body
Response
Error Codes
Example
mutation updatePublicationExample($input: UpdatePublicationInput!) {
updatePublication(input: $input) {
id
content_hash
author_address
signature
comment_count
created_at
updated_at
description
slug
}
}
# variables
{
"input": {
"id": "1",
"body": "value",
"description": "value",
"slug": "value"
}
}Implementation reference: server/graphql/mutations/publication.mjs
Update node settings transactionally.
Auth
Owner JWT
Params
Body
Response
Error Codes
Example
mutation updateSettingsExample($input: UpdateSettingsInput!) {
updateSettings(input: $input) {
enableRSS
allowFollow
allowComment
defaultLanguage
defaultTheme
walletConnectProjectId
pwaAppName
mail {
enabled
mailTransport
mailFrom
}
vapidPublicKey
}
}
# variables
{
"input": {
"enableRSS": true,
"allowFollow": true,
"allowComment": true,
"defaultLanguage": "value",
"defaultTheme": "value",
"walletConnectProjectId": "value",
"pwaAppName": "value",
"mailTransport": "value",
"mailFrom": "value"
}
}Implementation reference: server/graphql/mutations/settings.mjs