{"id":24129485,"url":"https://github.com/luandro/ssb-publish-graphql","last_synced_at":"2026-05-14T03:33:30.978Z","repository":{"id":34908816,"uuid":"189050564","full_name":"luandro/ssb-publish-graphql","owner":"luandro","description":null,"archived":false,"fork":false,"pushed_at":"2022-06-25T00:35:35.000Z","size":31,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-12T02:17:52.380Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/luandro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-28T15:01:47.000Z","updated_at":"2021-01-26T01:46:19.000Z","dependencies_parsed_at":"2022-08-19T21:50:37.721Z","dependency_job_id":null,"html_url":"https://github.com/luandro/ssb-publish-graphql","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luandro%2Fssb-publish-graphql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luandro%2Fssb-publish-graphql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luandro%2Fssb-publish-graphql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luandro%2Fssb-publish-graphql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luandro","download_url":"https://codeload.github.com/luandro/ssb-publish-graphql/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241317928,"owners_count":19943249,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-11T19:32:53.784Z","updated_at":"2026-05-14T03:33:25.959Z","avatar_url":"https://github.com/luandro.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SSB GraphQL Schema\n\n[![npm version](https://badge.fury.io/js/ssb-graphql-defaults.svg)](https://badge.fury.io/js/ssb-graphql-defaults)\n\nGraphQL schema for Secure Scuttlebot, meant to be used as a plugin with [open-app-graphql-server](https://github.com/open-app/open-app-graphql-server). You can also add it to your existing schema using [schema stitching](https://www.apollographql.com/docs/graphql-tools/schema-stitching.html).\n\n## Usage\n\nInstall it with `npm i -S ssb-graphql-defaults` and use it with your GraphQL server, or use it as a plugin with the [open-app-graphql-server](https://github.com/open-app/open-app-graphql-server).\n\n## API\n\n### Query\n\n##### `whoami`\nGet id of the current sbot user.\n\n#### messages\n\n##### `message({ id: String })`\nGet a message by its hash-id. Use fragments to get the content of specific messages such as a `post`:\n```\nquery {\n  message(id: \"%NgcMlAco0ZKI8lIteD/LRJMHKhFZrQxJvUrXaFmEIcQ=.sha256\") {\n    key\n    author\n    ... on PostMessage {\n      content {\n        type\n        text\n      }\n    }\n  }\n}\n```\n\n#### blobs\n\n##### `blob ({ id: String })`\nGet a blob by its ID.\n\n#### gossip\n\n##### `peers`\nGet the current peerlist.\n\n### Mutation\n\n#### messages\n\n##### `publish ({ type: String content: String })`\nConstruct a message using sbot's current user, and add it to the DB.\n\n- `content` ([stringified](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) object): The content of the message.\n- - `type` (string): The object's type.\n\n##### `publishPost ({ text: String })`\nPublish `post` message with text.\n\n### Subscription\n\n#### gossip\n\n##### `gossip`\nListen for gossip events.\n\n#### replicate\n\n##### `replicate`\nListen to replicate events.\n\n## To be included\n\n### Query\n\n#### friends\n\n##### `isFollowing ({ source: String, dest: String })`\nCallsback true if source follows dest, false otherwise.\n\n##### `isBlocking ({ source: String, dest: String})`\nCallsback true if source blocks dest, false otherwise.\n\n#### private\n\n##### `unbox ({ ciphertext: String })`\nAttempt to decrypt the content of an encrypted message.\n\n### Mutation\n\n#### blobs\n\n##### `wantBlob ({ id: String })`\nBegin searching the network for the blob of the given hash.\n\n##### `addBlob ({ source: File, id: String })`\nAdd a new blob to the DB.\n\n##### `removeBlob ({ id: String })`\nRemove a blob from the store.\n\n#### private\n\n##### `publishPrivate({ content, recps })`\nPublish an encrypted message.\n\n- `content` (object): The content of the message.\n- `recps` (array of feedids): The recipients of the message (limit 7).\n\n### Subscription\n\n#### messages\n\n##### `messagesByType ({ type: String })`\nRetrieve messages with a given type, ordered by receive-time.\n\n##### `feed`\nFetch messages ordered by their claimed timestamps\n\n##### `log`\nFetch messages ordered by the time received.\n\n##### `history ({ id: String })`\nFetch messages from a specific user, ordered by sequence numbers.\n\n##### `user ({ id: String })`\nFetch messages from a specific user, ordered by sequence numbers.\n\n- `rel` (string, optional): Filters the links by the relation string.\n\n##### `links ({ source: String, dest: String, rel: String })`\nGet a stream of messages, feeds, or blobs that are linked to/from an id.\n\n#### blobs\n\n##### `listBlobs`\nList the hashes of the blobs in the DB.\n\n##### `blobChanges`\nListen for any newly-downloaded blobs.\n\n#### friends\n\n##### `creaFriendStream({ start: String, graph:, dunbar:, hops:, meta:})`\nLive-stream the ids of feeds which meet the given hops query. If meta option is set, then will return steam of {id, hops}\n\n## Future plans\n\n- https://github.com/ssbc/ssb-backlinks\n- https://github.com/ssbc/ssb-threads\n- https://github.com/dominictarr/ssb-query\n- https://github.com/ssbc/ssb-contacts\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluandro%2Fssb-publish-graphql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluandro%2Fssb-publish-graphql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluandro%2Fssb-publish-graphql/lists"}