open-index/open-npm huggingface dataset:
npm package: @gospime/apollo-client
Description: Apollo HTTP client with response caching
Author: Oleg Kravchuk
Latest version: 4.0.1

# Facade to create apollo client
Apollo HTTP client with response caching

Options:
```node
const uri = `https://${hostname}:${port}${graphqlPath}`;
// options of https.Agent
const options = {
  //rejectUnauthorized: false // Skip SSL-restrictions
};

```

ApolloOptions:
[fetch-policy](https://medium.com/@galen.corey/understanding-apollo-fetch-policies-705b5ad71980)
```node
const apolloOptions = {
  query: {
    // How you want your component to interact with the Apollo cache.
    // Defaults to "cache-first".
    fetchPolicy: 'no-cache',
    // How you want your component to handle network and GraphQL errors.
    // Defaults to "none", which means we treat GraphQL errors as runtime errors.
    errorPolicy: 'all',
  }
};

```

Example: how to execute graphql `query`
```node
const Client = require('@gospime/apollo-client');

const plan = 'userSelect';
const args = { id: 2 }; // criteria to find a user
const fields = { fullname, email }; // fields to select

// calling of `query` method
Client
  .create(uri, options, apolloOptions)
  .query({ plan, args, fields })
  .then(result => console.log(result))
  .catch(error => console.error(error));
```

Example: how to execute graphql `mutation`
```node
const Client = require('@gospime/apollo-client');

const plan = 'userEdit';
const args = { id: 2, fullname: 'new fullname' }; // find user by `id` and update the fullname

// calling of `mutate` method
Client
  .create(uri, options, apolloOptions)
  .mutate({ plan, args })
  .then(result => console.log(result))
  .catch(error => console.error(error));
```
Async/await example:
```node
async () => await Client.create(uri, options, apolloOptions).mutate({ plan, args });
```
npm package: @gospime/base64
Description: Encode string from some encoding to another encoding
Author: Oleg Kravchuk
Latest version: 1.1.1

# Encode string from some encoding to another encoding

Example:
```node
import base64 from '@gospime/base64';

const encoded = base64.encode('foo');
const decoded = base64.decode(encoded);

const isEqual = encoded === decoded;

console.log(`Encoded: ${encoded}, Result: ${decoded}`);
```
npm package: @gospime/derby-client-preprocessors
Description: File preprocessors for Derby client's app
Author: Oleg Kravchuk
Latest version: 1.1.3

# File preprocessors for Derby client
Add client preprocessors to Derby client application

Used the next preprocessors:
- [pug](https://pugjs.org) and [@gospime/derby-pug](https://github.com/gospime/derby-pug)
- [stylus](http://stylus-lang.com/) and [derby-stylus](https://github.com/derbyjs/derby-stylus)
npm package: @gospime/mongodb-client
Description: Create a client connection to MongoDB
Author: Oleg Kravchuk
Latest version: 1.2.5

# Mongo connection
Create a client connection to MongoDB

Depends on native driver [node-mongodb-native](https://github.com/mongodb/node-mongodb-native)

---

Connection settings can be setup through process ENV or directly with input parameters.


Example of usage with input parameters:

```node
import client from '@gospime/mongodb-client';

const parameters = {
  settings: {
    schema: 'mongodb',
    host: 'provide.host',
    port: 'provide.port',
    name: 'provide.dbname',
    user: 'provide.username',
    password: 'provide.password'
  },
  options: {
    poolSize: 10
  }
};

const instance = client(parameters);
```

---

Setup connection settings with docker ENV:
```docker
DB_MONGO_SCHEME='mongodb';
DB_MONGO_HOST='provide.mongodb.host';
DB_MONGO_PORT='provide.mongodb.port';
DB_MONGO_NAME='provide.mongodb.name';
DB_MONGO_USER='provide.mongodb.user';
DB_MONGO_PASSWORD='provide.mongodb.password';
```

And simple calling from app:
```node
import client from '@gospime/mongodb-client';

const parameters = { options: { poolSize: 10 } };
const instance = client(parameters);
```

By the way, connection settings from `process.env` will be rewritten by the settings from input parameters.
npm package: @gospime/racer-services
Description: Plugin for conveniently adding and grabbing services (as in service layer services) to Racer or Derby.js
Author: Oleg Kravchuk
Latest version: 1.2.0

## Plugin for conveniently adding and grabbing services (as in service layer services) to Racer or Derby.js

How to include the plugin:
```node
import path from 'path';
// Create a derby instance
import derby from 'derby';

// `../services` - path to the folder with your services. Every service must have own folder inside of it.
const PATH_TO = path.resolve(__dirname, '../services');

// Include the plugin
derby.serverUse(module, '@gospime/racer-services', PATH_TO);
```

How to use a sevice inside of your backend application:
```node
// create an instance of service
const service = model.service('some-awesome-service'[, ...parameters]);
```