7.0.1 • Published 21 days ago

@ssb-graphql/whakapapa v7.0.1

Weekly downloads
37
License
AGPL-3.0
Repository
gitlab
Last release
21 days ago

@ssb-graphql/whakapapa

GraphQL types and resolvers for the ssb-whakapapa plugin.

Usage

Install ssb-graphql's main, profile, artefact, story and whakapapa packages:

npm i @ssb-graphql/main @ssb-graphql/profile @ssb-graphql/artefact @ssb-graphql/story @ssb-graphql/whakapapa

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-backlinks'))
  .use(require('ssb-query'))
  .use(require('ssb-profile'))
  .use(require('ssb-artefact'))
  .use(require('ssb-story'))
  .use(require('ssb-whakapapa'))
  .call(null, config)

const main = require('@ssb-graphql/main')(sbot)
const profile = require('@ssb-graphql/profile')(sbot)
const artefact = require('@ssb-graphql/artefact')(sbot)
const story = require('@ssb-graphql/story')(sbot)
const whakapapa = require('@ssb-graphql/whakapapa')(sbot, { ...profile.gettersWithCache, ...story.gettersWithCache, artefact.gettersWithCache })
// NOTE we're passing profile getters to whakapapa

profile.Context(sbot, (err, context) => {
  if (err) throw err
  const server = new ApolloServer({
    schema: buildFederatedSchema([
      main,
      profile,
      artefact,
      story,
      whakapapa
    ]),
    context
  })
})

Requirements

A ssb-server with the following plugins :

  • ssb-backlinks
  • ssb-query // a requirement of ssb-profile
  • ssb-profile
  • ssb-whakapapa

NOTE - if you have any problems check the requirements of @ssb-graphql/main @ssb-graphql/profile

TODO

run npm test to run tests

7.0.1

21 days ago

7.0.0

22 days ago

6.0.0

7 months ago

5.7.0

2 years ago

5.5.0

2 years ago

5.6.0

2 years ago

5.4.1

2 years ago

5.4.0

2 years ago

5.3.1

2 years ago

5.3.0

2 years ago

5.2.0

2 years ago

5.1.2

2 years ago

5.1.1

2 years ago

5.1.0

2 years ago

5.0.0

2 years ago

3.3.2

2 years ago

4.1.0

2 years ago

4.0.1

2 years ago

4.0.0

2 years ago

3.3.1

3 years ago

3.3.0

3 years ago

3.2.0

3 years ago

3.1.0

3 years ago

3.0.1

3 years ago

3.0.0

3 years ago

2.4.7

3 years ago

2.4.6

3 years ago

2.4.5

3 years ago

2.4.4

4 years ago

2.4.3

4 years ago

2.4.2

4 years ago

2.4.1

4 years ago

2.4.0

4 years ago

2.3.0

4 years ago

2.2.0

4 years ago

2.1.1

4 years ago

2.1.0

4 years ago

2.0.0

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago

0.3.0

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.2

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.5

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago