
Product
Introducing Repository Access Permissions and Custom Roles
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.
@ssb-graphql/main
Advanced tools
Main GraphQL types and resolvers for Secure Scuttlebutt. It provides primitives for CurrentIdentity, file-upload, Date handling etc.
npm i -S @ssb-graphql/main
const { ApolloServer } = require('apollo-server-express')
const { buildFederatedSchema } = require('@apollo/federation');
const Server = require('ssb-server')
const Config = require('ssb-config/inject')
const config = Config({})
const ssb = Server
.use(require('ssb-blobs')) // << required
.use(require('ssb-serve-blobs')) // << required
.call(null, config)
const main = require('@ssb-graphql/main')(ssb)
main.loadContext((err, context) => {
if (err) throw err
const server = new ApolloServer({
schema: buildFederatedSchema([
{ typeDefs: main.typeDefs, resolvers: main.resolvers },
// add other types + resolvers here!
]),
context
})
})
require('@ssb-graphql/main')(ssb, opts) => mainwhere:
ssb is a scuttlebutt instanceopts Object (optional) is of form { type: String } where:
type is the type of profile created (default: 'person')main.loadContext(cb)Where cb is a callback of signature cb(err, context) and context has form
{
public: {
feedId,
profileId // requires ssb-profile
},
personal: {
groupId, // requires ssb-tribes
profileId // requires ssb-profile + ssb-tribes
}
}
where:
public scope are things meant for the public domain,
public.feedId is the public id of your scuttlebutt instance (this is not a profileId)public.profileId points to an unecrypted totally public profilepersonal scope is for things only you will use
personal.groupId is the id of your personal group (for encrypted notes to self)personal.profileId points to a profile for you which encrypted to your personal group (so no-one else will see these details)NOTE:
ssb-profile installedssb-tribes
ssb-tribes is not installed, this will be skippedtype was set to pataka when main was instantiated, this will also be skippedAn ssb-server with the following plugins:
ssb-blobsssb-serve-blobsFor main.loadContext:
ssb-profilessb-tribes (optional, will skip functions if not present)See /src/typeDefs.js for the most up to date details on what's offered by this module.
run npm test to run tests
FAQs
Main GraphQL types and resolvers for Secure Scuttlebutt
The npm package @ssb-graphql/main receives a total of 20 weekly downloads. As such, @ssb-graphql/main popularity was classified as not popular.
We found that @ssb-graphql/main demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.