# @paladin-privacy/server

> Server for the distributed social network Paladin

Latest version **0.0.1** (published 2019-06-17) · GPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install @paladin-privacy/server
pnpm add @paladin-privacy/server
yarn add @paladin-privacy/server
bun add @paladin-privacy/server
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2019-06-17 |
| First published | 2019-06-17 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 201 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | matteskridge |

## Links

- npm: https://www.npmjs.com/package/@paladin-privacy/server
- Repository: https://github.com/paladin-privacy/server
- Homepage: https://github.com/paladin-privacy/server#readme
- Issues: https://github.com/paladin-privacy/server/issues
- npm.io page: https://npm.io/package/@paladin-privacy/server

## Dependencies (7)

- [jest](https://npm.io/package/jest.md) ^24.8.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.11
- [graphql](https://npm.io/package/graphql.md) ^14.3.1
- [typescript](https://npm.io/package/typescript.md) ^3.5.2
- [graphql-tag](https://npm.io/package/graphql-tag.md) ^2.10.1
- [graphql-tools](https://npm.io/package/graphql-tools.md) ^4.0.4
- [@paladin-privacy/profiles](https://npm.io/package/@paladin-privacy/profiles.md) 0.0.10

## Recent versions

- 0.0.1 (latest) — 2019-06-17

## README

# Paladin Server

This library is a generic Typescript implementation of the Paladin Server API. It includes all of the logic for managing a Paladin server, without specifically integrating that logic to a particular server environment. 

To make queries against the server:

```ts
// Define our query, context, and variables; these should usually be provided by the user
const query = `
  query GetProfileQuery($id: String!) {
    profile(id: $id) {
      id
      nickname
      data
    }
  }
`;
const context = {};
const variables = { id: '1234' };

// Define our database; MemoryPersistence is just an in-memory js object that can be used for temporary storage. 
// For a real implementation, you'll want to implement the Persistence interface to support some type of
// data persistence. A database for example.
const memory = new MemoryPersistence();
const graphql = createGraphQL(memory);

// Execute our query and get a response
const response = graphql(query, context, variables);

// Get the result
console.log(response.data.profile);
```

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