2.0.0 • Published 9 months ago

@ssb-graphql/invite v2.0.0

Weekly downloads
13
License
AGPL-3.0
Repository
gitlab
Last release
9 months ago

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

2.0.0

9 months ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

3 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.2

4 years ago

0.0.1

5 years ago