open-index/open-npm huggingface dataset:
npm package: @r26d/absinthe-apollo-link
Description: Special Apollo Link with Absinthe Support
Latest version: 1.1.8

# @r26d/absinthe-apollo-link

> Special Apollo Link with Absinthe Support

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
<!-- END doctoc -->

- [Installation](#installation)
  - [Using npm](#using-npm)
  - [Using yarn](#using-yarn)
- [Examples](#examples)
- [API](#api)
  - [createAbsintheApolloLink](#createabsintheapollolink)
    - [Parameters](#parameters)
- [References](#references)
- [License](#license)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

## Installation

### Using [npm](https://docs.npmjs.com/cli/npm)

    $ npm install --save @r26d/absinthe-apollo-link

### Using [yarn](https://yarnpkg.com)

    $ yarn add @r26d/absinthe-apollo-link

## Examples

1.  Create AbsintheSocketLink (`absinthe-socket-link.js`)

```javascript


import * as AbsintheSocket from "@r26d/absinthe-apollo-socket";
import {createAbsintheApolloLink} from "@r26d/absinthe-apollo-link";
import {Socket as PhoenixSocket} from "phoenix";

export default createAbsintheApolloLink(AbsintheSocket.create(
  new PhoenixSocket("ws://localhost:4000/socket")
));
```

2.  Send all the operations using AbsintheSocketLink

```javascript


import ApolloClient from "apollo-client";
import {InMemoryCache} from "apollo-cache-inmemory";

// see example 1
import absintheSocketLink from "./absinthe-socket-link";

const client = new ApolloClient({
  link: absintheSocketLink,
  cache: new InMemoryCache()
});
```

3.  Subscribe using AbsintheSocketLink and send queries and mutations using HttpLink

```javascript


import ApolloClient from "apollo-client";
import {createHttpLink} from "apollo-link-http";
import {hasSubscription} from "@r26d/utils-graphql";
import {InMemoryCache} from "apollo-cache-inmemory";
import {split} from "apollo-link";

// see example 1
import absintheSocketLink from "./absinthe-socket-link";

const link = split(
  operation => hasSubscription(operation.query),
  absintheSocketLink,
  createHttpLink({uri: "/graphql"})
);

const client = new ApolloClient({
  link,
  cache: new InMemoryCache()
});
```

## API

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

### createAbsintheApolloLink

Creates a terminating ApolloLink to request operations using given
AbsintheSocket instance

#### Parameters

*   `absintheSocket` &#x20;
*   `onError` &#x20;
*   `onStart` &#x20;

## References

*   [Absinthe Phoenix Socket](https://github.com/absinthe-graphql/absinthe-socket/tree/master/packages/socket)
*   **Apollo Link**
    *   [Apollo Client](http://apollo-link-docs.netlify.com/docs/link/#apollo-client)
    *   [Terminating Links](http://apollo-link-docs.netlify.com/docs/link/overview.html#terminating)
    *   [Directional Composition](http://apollo-link-docs.netlify.com/docs/link/composition.html#directional)
    *   [Http Link](http://apollo-link-docs.netlify.com/docs/link/links/http.html)

## License

[MIT](LICENSE.txt) :copyright:  r26D LLC
npm package: @r26d/absinthe-apollo-socket-graphiql
Description: Socket GraphiQL Utilities for Absinthe
Latest version: 1.1.5

# @r26d/absinthe-apollo-socket-graphiql

> Socket GraphiQL Utilities for Absinthe

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
<!-- END doctoc -->

- [Installation](#installation)
  - [Using npm](#using-npm)
  - [Using yarn](#using-yarn)
- [API](#api)
  - [createFetcher](#createfetcher)
    - [Parameters](#parameters)
- [License](#license)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

## Installation

### Using [npm](https://docs.npmjs.com/cli/npm)

    $ npm install --save phoenix @r26d/absinthe-apollo-socket-graphiql

### Using [yarn](https://yarnpkg.com)

    $ yarn add phoenix @r26d/absinthe-apollo-socket-graphiql

## API

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

### createFetcher

Creates a Fetcher using the given arguments

#### Parameters

*   `apiUrl` &#x20;
*   `subscriptionsClient` &#x20;
*   `subscriptionSentMessage` &#x20;

## License

[MIT](LICENSE.txt) :copyright:  r26D LLC
npm package: @r26d/absinthe-apollo-socket-relay
Description: Absinthe Socket Relay for React
Latest version: 1.1.4

# @r26d/absinthe-apollo-socket-relay

> Absinthe Socket Relay for React

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
<!-- END doctoc -->

- [Installation](#installation)
  - [Using npm](#using-npm)
  - [Using yarn](#using-yarn)
- [Examples](#examples)
- [API](#api)
  - [createFetcher](#createfetcher)
    - [Parameters](#parameters)
  - [createSubscriber](#createsubscriber)
    - [Parameters](#parameters-1)
  - [isSubscribed](#issubscribed)
    - [Parameters](#parameters-2)
- [References](#references)
- [License](#license)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

## Installation

### Using [npm](https://docs.npmjs.com/cli/npm)

    $ npm install --save @r26d/absinthe-apollo-socket-relay

### Using [yarn](https://yarnpkg.com)

    $ yarn add @r26d/absinthe-apollo-socket-relay

## Examples

*   **relay-environment.js**

```javascript
// @flow

import {createFetcher, createSubscriber} from "@absinthe-phoenix-socket-relay";
import {Environment, Network} from "relay-runtime";

import * as AbsintheSocket from '@r26d/absinthe-apollo-socket'

export default new Environment({
  network: Network.create(
    createFetcher(absintheSocket),
    createSubscriber(absintheSocket)
  ),
  store: new Store(new RecordSource())
});
```

## API

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

### createFetcher

Creates a Fetcher (Relay FetchFunction) using the given AbsintheSocket
instance

#### Parameters

*   `absintheSocket` &#x20;
*   `onError` &#x20;

### createSubscriber

Creates a Subscriber (Relay SubscribeFunction) using the given AbsintheSocket
instance

#### Parameters

*   `absintheSocket` &#x20;
*   `onRecoverableError` &#x20;

### isSubscribed

Returns a promise that resolves to `true` in case subscription of given
disposable has started or to `false` otherwise

#### Parameters

*   `disposable` &#x20;

## References

*   [Absinthe Socket](https://github.com/absinthe-graphql/absinthe-socket/tree/master/packages/socket)
*   **Relay**
    *   [Environment](https://facebook.github.io/relay/docs/relay-environment.html)
    *   [NetworkLayer](https://facebook.github.io/relay/docs/network-layer.html)
    *   [FetchFunction](https://github.com/facebook/relay/blob/master/packages/relay-runtime/network/RelayNetworkTypes.js#L79)
    *   [SubscribeFunction](https://github.com/facebook/relay/blob/master/packages/relay-runtime/network/RelayNetworkTypes.js#L93)

## License

[MIT](LICENSE.txt) :copyright: r26D LLC
npm package: @r2c/typed-ast-util
Description: A helper library for writing and running rules over type-augmented JS ASTs.
Author: Ash Zahlen
Latest version: 0.1.2

# `@r2c/typed-ast-rule-lib`

This library provides utility functions for defining and running AST rules that
operate over the output of the `r2c/typed-ast` analyzer, a tool developed by
[r2c](https://r2c.dev) for producing ASTs annotated with structured
representations of TypeScript types.
npm package: @r2d2b/eslint-config-typescript
Description: ## Usage
Author: Brykou
Latest version: 1.0.2

# eslint-config-typescript

## Usage

```
npx install-peerdeps --dev @r2d2b/eslint-config-typescript
```

Add `"extends": "@r2d2b/eslint-config-typescript"` to your eslint config file.
npm package: @r2d2bzh/json-schema-instantiator
Description: A simple instantiator for json schemas.
Author: Tom Arad
Latest version: 0.5.0-0

# JSON-Schema-Instantiator
A simple tool for instantiating JSON Schemas, with Angular support!

## Installing

### Node.js

```
npm install json-schema-instantiator
```

### AngularJS

```
bower install angular-schema-instantiator
```

## Using

### Node.js
``` javascript
var instantiator = require('json-schema-instantiator');

...

var schema = {
    "type": "object",
    "properties": {
        "title": {
            "type": "string",
            "default": "Example"
        },
        "description": {
            "type": "string"
        },
        "quantity": {
            "type": "number"
        },
        "endDate": {
            "type": "string",
            "format": "date"
        }
    },
    "required": ["title"]
};

instance = instantiator.instantiate(schema);
// instance === { title: "Example", description: "", quantity: 0, endDate: "" }

instance = instantiator.instantiate(schema, {requiredPropertiesOnly: false});
// instance === { title: "Example", description: "", quantity: 0, endDate: "" }

instance = instantiator.instantiate(schema, {requiredPropertiesOnly: true});
// instance === { title: "Example" }

// Override default values for a given type with a static value
instance = instantiator.instantiate(schema, { defaults: { number: 42 } });
// instance === { title: "Example", description: "", quantity: 42, endDate: "" }

// Override default values for a given type function that returns a value
instance = instantiator.instantiate(schema, {
  defaults: {
    // Function that receives current property/val and returns a value
    string: function (val) {
      var format = val.format;

      if (format && format === "date") {
        return new Date(2021, 0, 1);
      }

      return "";
    },
  },
});
// instance === { title: "Example", description: "", quantity: 0, endDate: new Date(2021, 0, 1) }
```

### AngularJS
Add the sources to index.html:

    <script src="json-schema-instanciator/src/instantiator.js"></script>
    <script src="json-schema-instanciator/src/angular-instantiator.js"></script>

Include the module:
``` javascript
angular.module('myApp', ['schemaInstantiator'])

...
```

Inject the InstantiatorService and use it:
``` javascript
...

.controller({
    MyCtrl: ['InstantiatorService', function(Instantiator) {
        var schema = {
            type: "string",
            default: "Hello!"
        };
        
        console.log(Instantiator.instantiate(schema));
        // Hello!
    }]
})

...
```

### Note
This does not replace schema validation! Invalid schemas will yield unexpected results.