Page Navigation

epress world protocol

Open

Collapsed while browsing epress node docs.

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.

Scope tags: Public/App | Internal/OperationalAuth is operation-specific

Operation Inventory

Click any operation to jump to its full reference.

MethodPath / OperationScopeAuthSummary
MUTATIONbroadcastProfileUpdate(typedData: JSON!, signature: String!)Public/AppOwner JWT + signatureBroadcast profile update over EWP.
MUTATIONconfirmComment(id: ID, tokenOrSignature: String!): Comment!Public/AppPublic token/signature flowConfirm pending comment.
MUTATIONconfirmCommentDeletion(token: String!)Public/AppPublic token flowConfirm deletion for email-auth comment.
MUTATIONcreateComment(input: CreateCommentInput!): Comment!Public/AppPublicCreate pending comment with EMAIL or ETHEREUM flow.
MUTATIONcreateConnection(typedData: JSON!, signature: String!)Public/AppOwner JWTFollow another node and establish connection.
MUTATIONcreatePublication(input: CreatePublicationInput!): Publication!Public/AppOwner JWT + permissionCreate publication record and content.
MUTATIONdestroyComment(id: ID!, signature: String, email: String): Comment!Public/AppOwner or commenter flowRequest comment deletion.
MUTATIONdestroyConnection(typedData: JSON!, signature: String!)Public/AppOwner JWTUnfollow node and remove connection.
MUTATIONdestroyPublication(id: ID!)Public/AppOwner JWT + permissionDelete publication.
MUTATIONgenerateIntegrationToken(scope: [String!]!, expiresIn: String): String!Public/AppOwner JWTCreate scoped integration token.
MUTATIONsignInWithEthereum(message: String!, signature: String!): String!Public/AppSIWE signatureAuthenticate owner and issue JWT.
MUTATIONsignPublication(id: ID!, signature: String!): Publication!Public/AppOwner JWT + signatureSign publication and trigger replication.
MUTATIONsubscribeNotification(subscription: PushSubscriptionInput!)Public/AppOwner JWTStore web push subscription.
MUTATIONunsubscribeNotification(endpoint: String!)Public/AppOwner JWTRemove web push subscription.
MUTATIONupdateProfile(input: UpdateProfileInput!)Public/AppOwner JWTUpdate node profile metadata and assets.
MUTATIONupdatePublication(input: UpdatePublicationInput!): Publication!Public/AppOwner JWT + permissionUpdate publication metadata.
MUTATIONupdateSettings(input: UpdateSettingsInput!): Settings!Public/AppOwner JWTUpdate node settings transactionally.
QUERYfetch(type: FetchType!, id: ID!)Public/AppPermission awareGeneric fetch for NODE, PUBLICATION, COMMENT models.
QUERYgetSiweMessage(address: String!): String!Public/AppNoneGenerate SIWE challenge with nonce JWT.
QUERYnodeStatusPublic/AppNoneFetch node version and uptime start time.
QUERYprofilePublic/AppNoneFetch self profile metadata.
QUERYsearch(type: SearchType!, filterBy: JSON, orderBy: String, first: Int, after: String, keyword: String)Public/AppPermission awareSearch nodes, publications, and comments.
QUERYsettings: SettingsPublic/AppOptional JWTFetch node settings with auth-aware sensitive fields.
QUERYsuggestions(query: String, type: String!, limit: Int)Public/AppNoneGet mention and hashtag suggestions.
QUERYvisitor(address: String!): VisitorPublic/AppNoneResolve relationship between self node and visitor node.

Query Operations

QUERYfetch(type: FetchType!, id: ID!)Public/App

Query fetch

Generic fetch for NODE, PUBLICATION, COMMENT models.

Auth

Permission aware

Params

  • type: FetchType! (NODE | PUBLICATION | COMMENT)
  • id: ID!
  • Publication id accepts numeric id, content hash, or slug.

Body

  • GraphQL request body: { query, variables }
  • type: FetchType! (NODE | PUBLICATION | COMMENT)
  • id: ID!
  • Publication id accepts numeric id, content hash, or slug.

Response

  • Return type: Node | Publication | Comment
  • Union return by type:
  • Node: address, url, title, description, is_self, created_at, updated_at
  • Publication: id, slug, description, signature, comment_count, created_at, updated_at, author, content
  • Comment: id, body, status, auth_type, author_name, author_id, created_at, publication, commenter

Error Codes

  • INVALID_QUERY
  • NOT_FOUND
  • FORBIDDEN

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

QUERYgetSiweMessage(address: String!): String!Public/App

Query getSiweMessage

Generate SIWE challenge with nonce JWT.

Auth

None

Params

  • address: String!
  • address: String! (wallet address that will sign SIWE message)

Body

  • GraphQL request body: { query, variables }
  • address: String!
  • address: String! (wallet address that will sign SIWE message)

Response

  • Return type: String!
  • JWT-backed nonce string embedded into SIWE message.

Error Codes

  • VALIDATION_FAILED
  • INTERNAL_SERVER_ERROR

Example

query GetSiweMessage($address: String!) {
  getSiweMessage(address: $address)
}

# variables
{
  "address": "0x0000000000000000000000000000000000000001"
}

Implementation reference: server/graphql/queries/auth.mjs

QUERYnodeStatusPublic/App

Query nodeStatus

Fetch node version and uptime start time.

Auth

None

Params

  • No arguments.

Body

  • GraphQL request body: { query, variables }
  • No arguments.

Response

  • Return type: NodeStatus
  • version: String!
  • startedAt: String!

Error Codes

  • Operation-specific GraphQL errors may be returned in errors[].

Example

query {
  nodeStatus {
    version
    startedAt
  }
}

Implementation reference: server/graphql/queries/nodeStatus.mjs

QUERYprofilePublic/App

Query profile

Fetch self profile metadata.

Auth

None

Params

  • No arguments.

Body

  • GraphQL request body: { query, variables }
  • No arguments.

Response

  • Return type: Profile
  • address: String!
  • url: String!
  • title: String
  • description: String
  • created_at: String!
  • updated_at: String!

Error Codes

  • Operation-specific GraphQL errors may be returned in errors[].

Example

query {
  profile {
    address
    url
    title
    description
    created_at
    updated_at
  }
}

Implementation reference: server/graphql/queries/profile.mjs

QUERYsettings: SettingsPublic/App

Query settings

Fetch node settings with auth-aware sensitive fields.

Auth

Optional JWT

Params

  • No arguments.

Body

  • GraphQL request body: { query, variables }
  • No arguments.

Response

  • Return type: Settings
  • enableRSS: Boolean!
  • allowFollow: Boolean!
  • allowComment: Boolean!
  • defaultLanguage: String!
  • defaultTheme: String!
  • walletConnectProjectId: String
  • pwaAppName: String
  • mail: Mail!
  • mail.enabled: Boolean!
  • mail.mailTransport: String
  • mail.mailFrom: String
  • vapidPublicKey: String
  • mail.mailTransport and mail.mailFrom are auth-sensitive and may be null for unauthenticated callers.

Error Codes

  • Operation-specific GraphQL errors may be returned in errors[].

Example

query {
  settings {
    enableRSS
    allowFollow
    allowComment
    defaultLanguage
    defaultTheme
    walletConnectProjectId
    pwaAppName
    mail {
      enabled
      mailTransport
      mailFrom
    }
    vapidPublicKey
  }
}

Implementation reference: server/graphql/queries/settings.mjs

QUERYsuggestions(query: String, type: String!, limit: Int)Public/App

Query suggestions

Get mention and hashtag suggestions.

Auth

None

Params

  • query: String
  • type: String!
  • limit: Int

Body

  • GraphQL request body: { query, variables }
  • query: String
  • type: String!
  • limit: Int

Response

  • Return type: [Suggestion]!
  • id: String!
  • label: String!
  • type: String!
  • address: String
  • url: String
  • hashtag: String

Error Codes

  • INVALID_SUGGESITION_TYPE

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

QUERYvisitor(address: String!): VisitorPublic/App

Query visitor

Resolve relationship between self node and visitor node.

Auth

None

Params

  • address: String!
  • address: String! (visitor wallet address to check follow relation)

Body

  • GraphQL request body: { query, variables }
  • address: String!
  • address: String! (visitor wallet address to check follow relation)

Response

  • Return type: Visitor
  • isFollower: Boolean!
  • isFollowing: Boolean!
  • node: Node
  • node.address: String
  • node.url: String
  • node.title: String
  • node.description: String
  • node.is_self: Boolean
  • node.created_at: String
  • node.updated_at: String
  • isFollower: whether visitor follows this node
  • isFollowing: whether this node follows visitor
  • node: visitor profile when present

Error Codes

  • Invalid address formats are normalized to false/false/null response

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

Mutation Operations

MUTATIONbroadcastProfileUpdate(typedData: JSON!, signature: String!)Public/App

Mutation broadcastProfileUpdate

Broadcast profile update over EWP.

Auth

Owner JWT + signature

Params

  • typedData: JSON!
  • signature: String!

Body

  • GraphQL request body: { query, variables }
  • typedData: JSON!
  • signature: String!

Response

  • Return type: Boolean!

Error Codes

  • UNAUTHENTICATED
  • INVALID_SIGNATURE

Example

mutation broadcastProfileUpdateExample($typedData: JSON!, $signature: String!) {
  broadcastProfileUpdate(typedData: $typedData, signature: $signature)
}

# variables
{
  "typedData": {},
  "signature": "value"
}

Implementation reference: server/graphql/mutations/profile.mjs

MUTATIONconfirmComment(id: ID, tokenOrSignature: String!): Comment!Public/App

Mutation confirmComment

Confirm pending comment.

Auth

Public token/signature flow

Params

  • id: ID
  • tokenOrSignature: String!
  • EMAIL flow: pass JWT token in tokenOrSignature.
  • ETHEREUM flow: pass signature in tokenOrSignature and provide id.

Body

  • GraphQL request body: { query, variables }
  • id: ID
  • tokenOrSignature: String!
  • EMAIL flow: pass JWT token in tokenOrSignature.
  • ETHEREUM flow: pass signature in tokenOrSignature and provide id.

Response

  • Return type: Comment!
  • id: Int
  • publication_id: Int
  • body: String
  • status: String
  • auth_type: String
  • author_name: String
  • author_id: String
  • credential: String
  • created_at: String
  • updated_at: String

Error Codes

  • VALIDATION_FAILED
  • INVALID_SIGNATURE
  • NOT_FOUND
  • FORBIDDEN
  • EXPIRED_SIGNATURE

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

MUTATIONconfirmCommentDeletion(token: String!)Public/App

Mutation confirmCommentDeletion

Confirm deletion for email-auth comment.

Auth

Public token flow

Params

  • token: String!

Body

  • GraphQL request body: { query, variables }
  • token: String!

Response

  • Return type: Comment!
  • id: Int
  • publication_id: Int
  • body: String
  • status: String
  • auth_type: String
  • author_name: String
  • author_id: String
  • credential: String
  • created_at: String
  • updated_at: String

Error Codes

  • INVALID_SIGNATURE
  • NOT_FOUND
  • FORBIDDEN

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

MUTATIONcreateComment(input: CreateCommentInput!): Comment!Public/App

Mutation createComment

Create pending comment with EMAIL or ETHEREUM flow.

Auth

Public

Params

  • input: CreateCommentInput!
  • input.publication_id: ID!
  • input.body: String!
  • input.author_name: String!
  • input.auth_type: String!
  • input.author_id: String
  • input.auth_type: EMAIL | ETHEREUM
  • EMAIL requires valid email in input.author_id and mail server configuration.
  • ETHEREUM requires valid wallet address in input.author_id.
  • New comments start as PENDING until confirmation.

Body

  • GraphQL request body: { query, variables }
  • input: CreateCommentInput!
  • input.publication_id: ID!
  • input.body: String!
  • input.author_name: String!
  • input.auth_type: String!
  • input.author_id: String
  • input.auth_type: EMAIL | ETHEREUM
  • EMAIL requires valid email in input.author_id and mail server configuration.
  • ETHEREUM requires valid wallet address in input.author_id.
  • New comments start as PENDING until confirmation.

Response

  • Return type: Comment!
  • id: Int
  • publication_id: Int
  • body: String
  • status: String
  • auth_type: String
  • author_name: String
  • author_id: String
  • credential: String
  • created_at: String
  • updated_at: String

Error Codes

  • COMMENT_DISABLED
  • VALIDATION_FAILED
  • NOT_FOUND
  • MAIL_NOT_CONFIGURED

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

MUTATIONcreateConnection(typedData: JSON!, signature: String!)Public/App

Mutation createConnection

Follow another node and establish connection.

Auth

Owner JWT

Params

  • typedData: JSON!
  • signature: String!

Body

  • GraphQL request body: { query, variables }
  • typedData: JSON!
  • signature: String!

Response

  • Return type: Node!
  • address: String
  • url: String
  • title: String
  • description: String
  • is_self: Boolean
  • created_at: String
  • updated_at: String

Error Codes

  • FOLLOW_DISABLED
  • VALIDATION_FAILED
  • INVALID_SIGNATURE
  • INTERNAL_SERVER_ERROR
  • FOLLOWEE_IDENTITY_MISMATCH
  • SIGNER_MISMATCH
  • CONNECTION_ALREADY_EXISTS

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

MUTATIONcreatePublication(input: CreatePublicationInput!): Publication!Public/App

Mutation createPublication

Create publication record and content.

Auth

Owner JWT + permission

Params

  • input: CreatePublicationInput!
  • input.type: String!
  • input.body: String
  • input.file: GraphQLUpload
  • input.description: String
  • input.slug: String
  • input.type supports POST or FILE.
  • POST requires body and rejects file.
  • FILE requires file and description.
  • slug must match [a-z0-9-]+ and be unique per author.

Body

  • GraphQL request body: { query, variables }
  • input: CreatePublicationInput!
  • input.type: String!
  • input.body: String
  • input.file: GraphQLUpload
  • input.description: String
  • input.slug: String
  • input.type supports POST or FILE.
  • POST requires body and rejects file.
  • FILE requires file and description.
  • slug must match [a-z0-9-]+ and be unique per author.

Response

  • Return type: Publication!
  • id: Int
  • content_hash: String
  • author_address: String
  • signature: String
  • comment_count: Int
  • created_at: String
  • updated_at: String
  • description: String
  • slug: String

Error Codes

  • UNAUTHENTICATED
  • FORBIDDEN
  • VALIDATION_FAILED
  • INTERNAL_SERVER_ERROR

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

MUTATIONdestroyComment(id: ID!, signature: String, email: String): Comment!Public/App

Mutation destroyComment

Request comment deletion.

Auth

Owner or commenter flow

Params

  • id: ID!
  • signature: String
  • email: String
  • Owner flow: authenticated owner with delete permission can delete directly.
  • EMAIL flow: provide email; node sends confirmation email before deletion.
  • ETHEREUM flow: provide signature bound to DeleteComment typed data.

Body

  • GraphQL request body: { query, variables }
  • id: ID!
  • signature: String
  • email: String
  • Owner flow: authenticated owner with delete permission can delete directly.
  • EMAIL flow: provide email; node sends confirmation email before deletion.
  • ETHEREUM flow: provide signature bound to DeleteComment typed data.

Response

  • Return type: Comment!
  • id: Int
  • publication_id: Int
  • body: String
  • status: String
  • auth_type: String
  • author_name: String
  • author_id: String
  • credential: String
  • created_at: String
  • updated_at: String

Error Codes

  • NOT_FOUND
  • VALIDATION_FAILED
  • FORBIDDEN
  • INVALID_SIGNATURE
  • INTERNAL_SERVER_ERROR

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

MUTATIONdestroyConnection(typedData: JSON!, signature: String!)Public/App

Mutation destroyConnection

Unfollow node and remove connection.

Auth

Owner JWT

Params

  • typedData: JSON!
  • signature: String!

Body

  • GraphQL request body: { query, variables }
  • typedData: JSON!
  • signature: String!

Response

  • Return type: Node!
  • address: String
  • url: String
  • title: String
  • description: String
  • is_self: Boolean
  • created_at: String
  • updated_at: String

Error Codes

  • VALIDATION_FAILED
  • INVALID_SIGNATURE
  • INTERNAL_SERVER_ERROR
  • FOLLOWEE_IDENTITY_MISMATCH
  • SIGNER_MISMATCH
  • NOT_FOUND

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

MUTATIONdestroyPublication(id: ID!)Public/App

Mutation destroyPublication

Delete publication.

Auth

Owner JWT + permission

Params

  • id: ID!

Body

  • GraphQL request body: { query, variables }
  • id: ID!

Response

  • Return type: Publication!
  • id: Int
  • content_hash: String
  • author_address: String
  • signature: String
  • comment_count: Int
  • created_at: String
  • updated_at: String
  • description: String
  • slug: String

Error Codes

  • UNAUTHENTICATED
  • FORBIDDEN
  • NOT_FOUND

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

MUTATIONgenerateIntegrationToken(scope: [String!]!, expiresIn: String): String!Public/App

Mutation generateIntegrationToken

Create scoped integration token.

Auth

Owner JWT

Params

  • scope: [String]!
  • expiresIn: String
  • scope: [String!]! (permission list for integration token)
  • expiresIn: String (default 24h)

Body

  • GraphQL request body: { query, variables }
  • scope: [String]!
  • expiresIn: String
  • scope: [String!]! (permission list for integration token)
  • expiresIn: String (default 24h)

Response

  • Return type: String!
  • JWT token for aud=integration with permission scope claims.

Error Codes

  • UNAUTHENTICATED
  • INTERNAL_SERVER_ERROR

Example

mutation generateIntegrationTokenExample($scope: [String]!, $expiresIn: String) {
  generateIntegrationToken(scope: $scope, expiresIn: $expiresIn)
}

# variables
{
  "scope": [],
  "expiresIn": "value"
}

Implementation reference: server/graphql/mutations/auth.mjs

MUTATIONsignInWithEthereum(message: String!, signature: String!): String!Public/App

Mutation signInWithEthereum

Authenticate owner and issue JWT.

Auth

SIWE signature

Params

  • message: String!
  • signature: String!
  • message: String! (SIWE message from getSiweMessage flow)
  • signature: String! (wallet signature over SIWE message)

Body

  • GraphQL request body: { query, variables }
  • message: String!
  • signature: String!
  • message: String! (SIWE message from getSiweMessage flow)
  • signature: String! (wallet signature over SIWE message)

Response

  • Return type: String!
  • JWT token for aud=client owner session.

Error Codes

  • INVALID_SIGNATURE
  • EXPIRED_NONCE
  • UNAUTHENTICATED
  • INTERNAL_SERVER_ERROR

Example

mutation signInWithEthereumExample($message: String!, $signature: String!) {
  signInWithEthereum(message: $message, signature: $signature)
}

# variables
{
  "message": "value",
  "signature": "value"
}

Implementation reference: server/graphql/mutations/auth.mjs

MUTATIONsignPublication(id: ID!, signature: String!): Publication!Public/App

Mutation signPublication

Sign publication and trigger replication.

Auth

Owner JWT + signature

Params

  • id: ID!
  • signature: String!
  • id: ID! (publication id)
  • signature: String! (wallet signature for statementOfSource typed data)

Body

  • GraphQL request body: { query, variables }
  • id: ID!
  • signature: String!
  • id: ID! (publication id)
  • signature: String! (wallet signature for statementOfSource typed data)

Response

  • Return type: Publication!
  • id: Int
  • content_hash: String
  • author_address: String
  • signature: String
  • comment_count: Int
  • created_at: String
  • updated_at: String
  • description: String
  • slug: String
  • Returns signed publication and may trigger replication fan-out to followers.

Error Codes

  • UNAUTHENTICATED
  • NOT_FOUND
  • FORBIDDEN
  • INVALID_SIGNATURE

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

MUTATIONsubscribeNotification(subscription: PushSubscriptionInput!)Public/App

Mutation subscribeNotification

Store web push subscription.

Auth

Owner JWT

Params

  • subscription: PushSubscriptionInput!
  • subscription.endpoint: String!
  • subscription.keys: PushSubscriptionKeys!
  • subscription.keys.p256dh: String!
  • subscription.keys.auth: String!

Body

  • GraphQL request body: { query, variables }
  • subscription: PushSubscriptionInput!
  • subscription.endpoint: String!
  • subscription.keys: PushSubscriptionKeys!
  • subscription.keys.p256dh: String!
  • subscription.keys.auth: String!

Response

  • Return type: SaveSubscriptionResult!
  • success: Boolean!
  • message: String

Error Codes

  • UNAUTHENTICATED
  • INTERNAL_SERVER_ERROR

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

MUTATIONunsubscribeNotification(endpoint: String!)Public/App

Mutation unsubscribeNotification

Remove web push subscription.

Auth

Owner JWT

Params

  • endpoint: String!

Body

  • GraphQL request body: { query, variables }
  • endpoint: String!

Response

  • Return type: SaveSubscriptionResult!
  • success: Boolean!
  • message: String

Error Codes

  • UNAUTHENTICATED
  • INTERNAL_SERVER_ERROR

Example

mutation unsubscribeNotificationExample($endpoint: String!) {
  unsubscribeNotification(endpoint: $endpoint) {
    success
    message
  }
}

# variables
{
  "endpoint": "value"
}

Implementation reference: server/graphql/mutations/settings.mjs

MUTATIONupdateProfile(input: UpdateProfileInput!)Public/App

Mutation updateProfile

Update node profile metadata and assets.

Auth

Owner JWT

Params

  • input: UpdateProfileInput!
  • input.title: String
  • input.description: String
  • input.url: String
  • input.avatar: GraphQLUpload
  • input.background: GraphQLUpload

Body

  • GraphQL request body: { query, variables }
  • input: UpdateProfileInput!
  • input.title: String
  • input.description: String
  • input.url: String
  • input.avatar: GraphQLUpload
  • input.background: GraphQLUpload

Response

  • Return type: Profile
  • address: String!
  • url: String!
  • title: String
  • description: String
  • created_at: String!
  • updated_at: String!

Error Codes

  • UNAUTHENTICATED
  • VALIDATION_FAILED

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

MUTATIONupdatePublication(input: UpdatePublicationInput!): Publication!Public/App

Mutation updatePublication

Update publication metadata.

Auth

Owner JWT + permission

Params

  • input: UpdatePublicationInput!
  • input.id: ID!
  • input.body: String
  • input.description: String
  • input.slug: String
  • Signed publications cannot be updated.
  • Only publication author can update.
  • slug validation and uniqueness rules are enforced.

Body

  • GraphQL request body: { query, variables }
  • input: UpdatePublicationInput!
  • input.id: ID!
  • input.body: String
  • input.description: String
  • input.slug: String
  • Signed publications cannot be updated.
  • Only publication author can update.
  • slug validation and uniqueness rules are enforced.

Response

  • Return type: Publication!
  • id: Int
  • content_hash: String
  • author_address: String
  • signature: String
  • comment_count: Int
  • created_at: String
  • updated_at: String
  • description: String
  • slug: String

Error Codes

  • UNAUTHENTICATED
  • FORBIDDEN
  • NOT_FOUND
  • VALIDATION_FAILED
  • INTERNAL_SERVER_ERROR

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

MUTATIONupdateSettings(input: UpdateSettingsInput!): Settings!Public/App

Mutation updateSettings

Update node settings transactionally.

Auth

Owner JWT

Params

  • input: UpdateSettingsInput!
  • input.enableRSS: Boolean
  • input.allowFollow: Boolean
  • input.allowComment: Boolean
  • input.defaultLanguage: String
  • input.defaultTheme: String
  • input.walletConnectProjectId: String
  • input.pwaAppName: String
  • input.mailTransport: String
  • input.mailFrom: String
  • Owner authentication required.
  • Boolean values are persisted as string flags in settings storage.
  • mail object in response is derived from mailTransport + mailFrom.

Body

  • GraphQL request body: { query, variables }
  • input: UpdateSettingsInput!
  • input.enableRSS: Boolean
  • input.allowFollow: Boolean
  • input.allowComment: Boolean
  • input.defaultLanguage: String
  • input.defaultTheme: String
  • input.walletConnectProjectId: String
  • input.pwaAppName: String
  • input.mailTransport: String
  • input.mailFrom: String
  • Owner authentication required.
  • Boolean values are persisted as string flags in settings storage.
  • mail object in response is derived from mailTransport + mailFrom.

Response

  • Return type: Settings!
  • enableRSS: Boolean!
  • allowFollow: Boolean!
  • allowComment: Boolean!
  • defaultLanguage: String!
  • defaultTheme: String!
  • walletConnectProjectId: String
  • pwaAppName: String
  • mail: Mail!
  • mail.enabled: Boolean!
  • mail.mailTransport: String
  • mail.mailFrom: String
  • vapidPublicKey: String

Error Codes

  • UNAUTHENTICATED
  • INTERNAL_SERVER_ERROR

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