npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ssb-publish-graphql

v1.0.0

Published

Secure Scuttlebot publish mutations for Open App GraphQL Server

Downloads

9

Readme

SSB GraphQL Schema

npm version

GraphQL schema for Secure Scuttlebot, meant to be used as a plugin with open-app-graphql-server. You can also add it to your existing schema using schema stitching.

Usage

Install 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.

API

Query

whoami

Get id of the current sbot user.

messages

message({ id: String })

Get a message by its hash-id. Use fragments to get the content of specific messages such as a post:

query {
  message(id: "%NgcMlAco0ZKI8lIteD/LRJMHKhFZrQxJvUrXaFmEIcQ=.sha256") {
    key
    author
    ... on PostMessage {
      content {
        type
        text
      }
    }
  }
}

blobs

blob ({ id: String })

Get a blob by its ID.

gossip

peers

Get the current peerlist.

Mutation

messages

publish ({ type: String content: String })

Construct a message using sbot's current user, and add it to the DB.

  • content (stringified object): The content of the message.
    • type (string): The object's type.
publishPost ({ text: String })

Publish post message with text.

Subscription

gossip

gossip

Listen for gossip events.

replicate

replicate

Listen to replicate events.

To be included

Query

friends

isFollowing ({ source: String, dest: String })

Callsback true if source follows dest, false otherwise.

isBlocking ({ source: String, dest: String})

Callsback true if source blocks dest, false otherwise.

private

unbox ({ ciphertext: String })

Attempt to decrypt the content of an encrypted message.

Mutation

blobs

wantBlob ({ id: String })

Begin searching the network for the blob of the given hash.

addBlob ({ source: File, id: String })

Add a new blob to the DB.

removeBlob ({ id: String })

Remove a blob from the store.

private

publishPrivate({ content, recps })

Publish an encrypted message.

  • content (object): The content of the message.
  • recps (array of feedids): The recipients of the message (limit 7).

Subscription

messages

messagesByType ({ type: String })

Retrieve messages with a given type, ordered by receive-time.

feed

Fetch messages ordered by their claimed timestamps

log

Fetch messages ordered by the time received.

history ({ id: String })

Fetch messages from a specific user, ordered by sequence numbers.

user ({ id: String })

Fetch messages from a specific user, ordered by sequence numbers.

  • rel (string, optional): Filters the links by the relation string.
links ({ source: String, dest: String, rel: String })

Get a stream of messages, feeds, or blobs that are linked to/from an id.

blobs

listBlobs

List the hashes of the blobs in the DB.

blobChanges

Listen for any newly-downloaded blobs.

friends

creaFriendStream({ start: String, graph:, dunbar:, hops:, meta:})

Live-stream the ids of feeds which meet the given hops query. If meta option is set, then will return steam of {id, hops}

Future plans

  • https://github.com/ssbc/ssb-backlinks
  • https://github.com/ssbc/ssb-threads
  • https://github.com/dominictarr/ssb-query
  • https://github.com/ssbc/ssb-contacts