@ssb-graphql/invite

2.0.0 • Public • Published

GraphQL for Secure Scuttlebutt

Invites GraphQL types and resolvers for Secure Scuttlebutt. It provides primitives for creating and accepting invites.

Usage

npm i -S @ssb-graphql/invite

Example Usage

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 sbot = Server
  .use(require('ssb-invite')) // << required
  .call(null, config)

const invite = require('@ssb-graphql/invite')(sbot)

const server = new ApolloServer({
  schema: buildFederatedSchema([
    { typeDefs: invite.typeDefs, resolvers: invite.resolvers },
    // add other types + resolvers here!
  ])
})

Requirements

An ssb-server / secret-stack with plugins:

  • ssb-invite
  • ssb-friends

API

See /src/typeDefs.js for the most up to date details on what's offered by this module.

Testing

run npm test to run tests

Package Sidebar

Install

npm i @ssb-graphql/invite

Weekly Downloads

1

Version

2.0.0

License

AGPL-3.0

Unpacked Size

14.5 kB

Total Files

9

Last publish

Collaborators

  • luandro
  • mixmix
  • staltz
  • chereseeriepa
  • christianbundy
  • ben-tai