# @ssb-graphql/whakapapa

> GraphQL types and resolvers for the ssb-whakapapa plugin

Latest version **7.0.1** (published 2024-04-10) · AGPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install @ssb-graphql/whakapapa
pnpm add @ssb-graphql/whakapapa
yarn add @ssb-graphql/whakapapa
bun add @ssb-graphql/whakapapa
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 7.0.1 |
| Published | 2024-04-10 |
| First published | 2020-01-24 |
| Weekly downloads | 0 |
| License | AGPL-3.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 9 |
| Unpacked size | 113.4 KB |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| Author | luandro |
| Maintainers | luandro, mixmix, staltz, chereseeriepa, christianbundy, ben-tai |
| Keywords | scuttlebutt, ahau, whakapapa |

## Links

- npm: https://www.npmjs.com/package/@ssb-graphql/whakapapa
- Repository: https://gitlab.com/ahau/ssb-graphql-whakapapa
- Homepage: https://gitlab.com/ahau/ssb-graphql-whakapapa#readme
- Issues: https://gitlab.com/ahau/ssb-graphql-whakapapa/issues
- npm.io page: https://npm.io/package/@ssb-graphql/whakapapa

## Dependencies (9)

- [hashlru](https://npm.io/package/hashlru.md) ^2.3.0
- [lodash.get](https://npm.io/package/lodash.get.md) ^4.4.2
- [lodash.set](https://npm.io/package/lodash.set.md) ^4.3.2
- [graphql-tag](https://npm.io/package/graphql-tag.md) ^2.12.6
- [lodash.pick](https://npm.io/package/lodash.pick.md) ^4.4.0
- [pull-stream](https://npm.io/package/pull-stream.md) ^3.7.0
- [pull-flatmap](https://npm.io/package/pull-flatmap.md) ^0.0.1
- [pull-paramap](https://npm.io/package/pull-paramap.md) ^1.2.2
- [lodash.uniqby](https://npm.io/package/lodash.uniqby.md) ^4.7.0

## Recent versions

- 7.0.1 (latest) — 2024-04-10
- 7.0.0 — 2024-04-10
- 6.0.0 — 2023-10-04
- 5.7.0 — 2022-10-02
- 5.6.0 — 2022-07-17
- 5.5.0 — 2022-06-16
- 5.4.1 — 2022-06-10
- 5.4.0 — 2022-05-06
- 5.3.1 — 2022-02-17
- 5.3.0 — 2022-02-17
- 5.2.0 — 2022-02-03
- 5.1.2 — 2021-11-24
- 5.1.1 — 2021-11-23
- 5.1.0 — 2021-11-18
- 5.0.0 — 2021-11-11
- … 36 more at https://npm.io/package/@ssb-graphql/whakapapa/versions

## README

# @ssb-graphql/whakapapa

GraphQL types and resolvers for the `ssb-whakapapa` plugin.

## Usage

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

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

## Example Usage

```js
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

---
_Source: https://npm.io/package/@ssb-graphql/whakapapa · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
