@ssb-graphql/story

4.0.1 • Public • Published

ssb-graphql-story

GraphQL types and resolvers for the ssb-story plugin

Dependencies

ssb-query

Usage

Install ssb-graphqls main:

npm i -S @ssb-graphql/main

Example Usage

const ahauServer = require('ahau-graphql-server')

const Server = require('ssb-server')
const Config = require('ssb-config/inject')

const config = Config({})

const sbot = Server
  .use(require('ssb-backlinks'))
  .use(require('ssb-story'))
  .call(null, config)

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

main.Context(sbot, (err, context) => {
  if (err) throw err

  ahauServer({
    schemas: [
      main,
      story
    ],
    context,
    port
  }, (err, httpServer) => {
    //ready!
  })
})

Readme

Keywords

Package Sidebar

Install

npm i @ssb-graphql/story

Weekly Downloads

57

Version

4.0.1

License

AGPL-3.0

Unpacked Size

34.8 kB

Total Files

20

Last publish

Collaborators

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