open-index/open-npm huggingface dataset:
npm package: @grapi/mongodb
Description: The mongodb package of Grapi
Author: madrov
Latest version: 3.0.6

<div align="center">

<a href="https://github.com/scalars/grapi"><img src="https://raw.githubusercontent.com/scalars/grapi/master/resources/logo-grapi.svg" width="50%"></a>

</div>

<br/>

## MongoDB Data-Source

```shell
yarn add @grapi/mongodb
```

```graphql
# Add on file schema.graphql
type VehiclesFromActor implements Relation @config(
    name: "VehiclesFromActor"
    foreignKey: { key: "owner_car_id" }
)

type Actor @Model( dataSource: "datasource", key: "Actor" ) {
    id: ID ! @unique
    name: String !
    vehicles: [ Vehicle ! ] ! @relation( with: VehiclesFromActor )
}

type Vehicle @Model( dataSource: "datasource", key: "Vehicle" ) {
    id: ID ! @unique
    trademark: String !
    model: String
    name: String
    owner: Actor @relation( with: VehiclesFromActor )
}
```

```typescript
// server.ts
import { readFileSync } from 'fs'
import { resolve } from 'path'
import { MongodbDataSourceGroup } from '@grapi/mongodb'
import { Grapi } from '@grapi/server'
import { ApolloServer } from 'apollo-server'

const getDataSource = async () => {
    const datasource = new MongodbDataSourceGroup(
        process.env.MONGO_URI,
        process.env.DATA_BASE_NAME
    )
    await datasource.initialize()
    return datasource
}

const startGraphQLServer = async () => {
    const datasource = await getDataSource()
    const sdl = readFileSync( resolve( __dirname, 'schema.graphql' ) ).toString()
    const grapi = new Grapi( {
        sdl,
        dataSources: {
            datasource: ( args ) => datasource.getDataSource( args.key ),
        }
    } )
    const server = new ApolloServer( grapi.createApolloConfig() )
    server.listen().then( ( { url } ) => { 
        console.info( `GraphQL Server On: ${ url }` )
        console.info( `Go To Browser And See PlayGround` )
    } )
}

startGraphQLServer()
```

## Extended Documentation

<div>
    <a href="https://github.com/scalars/grapi">
        Grapi
    </a>
</div>

## License

Apache-2.0

![footer banner](https://madrov.com/favicon.ico)


Madrov Team
npm package: @grapl/pulumi-hcp
Description: A Pulumi package for creating and managing HCP cloud resources.
Latest version: 0.1.14

# HCP Resource Provider

The HCP Resource Provider lets you manage [Hashicorp Cloud Platform](https://cloud.hashicorp.com/) resources.

**NOTE**: This provider is in the process of being migrated to the
[Pulumiverse](https://github.com/pulumiverse) organization. Make note
of the upcoming package name changes below for your SDK.

## Installing

This package is available for several languages/platforms:

### Node.js (JavaScript/TypeScript)

To use from JavaScript or TypeScript in Node.js, install using either `npm`:

```bash
npm install @grapl/pulumi-hcp
```
Or, following the Pulumiverse migration:
```bash
npm install @pulumiverse/hcp
```

or `yarn`:

```bash
yarn add @grapl/pulumi-hcp
```
Or, following the Pulumiverse migration:
```bash
yarn add @pulumiverse/hcp
```

### Python

To use from Python, install using `pip`:

```bash
pip install pulumi_hcp
```
Or, following the Pulumiverse migration:
```bash
pip install pulumiverse_hcp
```

### Go

To use from Go, use `go get` to grab the latest version of the library:

```bash
go get github.com/grapl-security/pulumi-hcp/sdk/go/...
```
Or, following the Pulumiverse migration:
```bash
go get github.com/pulumiverse/pulumi-hcp/sdk/go/...
```

## Configuration

The following configuration points are available for the `hcp` provider:

- `hcp:clientId` (environment: `HCP_CLIENT_ID`) - The OAuth2 Client ID for API operations.
- `hcp:clientSecret` (environment: `HCP_CLIENT_SECRET`) - The OAuth2 Client Secret for API operations.

## Reference

For detailed reference documentation, please visit [the Pulumi registry](https://www.pulumi.com/registry/packages/hcp/api-docs/).