open-index/open-npm huggingface dataset:
npm package: @prevalentware/prisma-cosmo
Description: Prisma GraphQL generator
Author: prevalentWare
Latest version: 0.1.40

# 🚀 Prisma-Cosmo

A powerful tool that automatically generates SDL-first GraphQL types and resolvers from your Prisma schema.

## 🌟 Features

- Generates GraphQL SDL types from Prisma models
- Creates basic CRUD resolvers automatically
- Supports both single and multiple Prisma schema files
- Generates TypeScript types for better type safety
- Creates DataLoaders for optimal query performance
- AWS AppSync compatible out of the box

## 📦 Installation

```bash
# Using bun (recommended)
bun add prisma-cosmo

# Using npm
npm install prisma-cosmo

# Using yarn
yarn add prisma-cosmo
```

## 🛠️ Usage

### Basic Usage

1. Place your Prisma schema(s) in the `prisma` folder:

   - For a single schema: `prisma/schema.prisma`
   - For multiple schemas: `prisma/schema/*.prisma`

2. Run Cosmo:

```bash
bun run cosmo
```

3. Cosmo will generate:
   - GraphQL SDL types
   - Basic CRUD resolvers
   - TypeScript types
   - DataLoaders for performance optimization

The generated code will be in the `prisma/generated` directory.

### Schema Organization

You can organize your Prisma schema in two ways:

1. **Single Schema File**:

   - Place your schema in `prisma/schema.prisma`

2. **Multiple Schema Files**:
   - Place your schemas in `prisma/schema/` directory
   - Example structure:
     ```
     prisma/
     ├── schema/
     │   ├── auth.prisma
     │   ├── users.prisma
     │   └── products.prisma
     ```
     Cosmo will automatically merge these files when needed.

### Ignoring Models

To exclude specific models from generation, add the `/// cosmo-ignore` comment above the model:

```prisma
/// cosmo-ignore
model TemporaryData {
  id Int @id
  data String
}
```

## 📚 Generated Structure

```
prisma/
└── generated/
    ├── models/
    │   └── [model]/
    │       ├── types.ts
    │       ├── resolvers.ts
    │       └── dataLoaders.ts
    └── schema.graphql
```

## 🔧 Configuration

No additional configuration needed! Cosmo follows Prisma's schema conventions and automatically generates appropriate GraphQL types and resolvers.

## 🤝 Contributing

We welcome contributions! Please feel free to submit a Pull Request.

## 📝 License

MIT

## 💪 Support

If you find any bugs or have feature requests, please create an issue on our GitHub repository.

For direct support:

- Email: dsaldarriaga@prevalentware.com
- GitHub Issues: [Create an issue](https://github.com/prevalentware/prisma-cosmo/issues)

## 🏢 About

Developed and maintained by [prevalentWare](https://prevalentware.com/)
npm package: @preventor/button
Description: Preventor Web SDK
Latest version: 0.1.8

<p align="center"><a href="https://preventor.com/" target="_blank" rel="noopener noreferrer"><img width="200" src="https://uploads-ssl.webflow.com/5f774172772fc1fb1fa10c12/5f92db3547adde04817b94b3_brand-preventor.png" alt="Preventor logo"></a></p>

## Verification Flow
![alt text](https://docs.preventor.com/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MQD7wU34mG7rs7Bz7vm-887967055%2Fuploads%2FHUqQAYbiII6hRhIJPA2s%2FUntitled%20Diagram.drawio%20(1).png?alt=media&token=737a5f8d-a2b8-4a9e-93dc-8b6a9aed2649)

## Get Started
### 1. Add pvt-button tag in your HTML
```
<pvt-button></pvt-button>
```
### 2. Installation via CDN or NPM
CDN
```
<script src="https://unpkg.com/@preventor/button"></script>
```
NPM
```
npm install @preventor/button
``` 

### 3. Initialize configuration
```
<script>
  const pvtButton = document.querySelector("pvt-button");
  pvtButton.addEventListener("loaded", () => {
    const config = {
      flowType: "YOUR_FLOW_TYPE",
      credentials: {
        apiKey: "YOUR_API_KEY",
        clientSecret: "YOUR_CLIENT_SECRET",
        tenant: "YOUR_TENANT",
        banknu: "YOUR_BANKNU",
        env: "YOUR_ENV",
      },
      cifCode: "YOUR_CIFCODE"
    };
    pvtButton.initialize(config);
  });
</script>
```
## Documentation

You can find the full documentation [on the website](https://docs.preventor.com/web-client-side-sdks/html-+-javascript/).
npm package: @preventor/invitation
Description: Preventor invitation web SDK
Latest version: 0.0.37

<p align="center"><a href="https://preventor.com/" target="_blank" rel="noopener noreferrer"><img width="200" src="https://app.preventor.com/app/assets/img/isotipo.svg" alt="Preventor logo"></a></p>

## Get Started
### 1. Add pvt-invitation tag in your HTML
```
<pvt-invitation></pvt-invitation>
```
### 2. Installation via CDN or NPM
CDN
```
<script src="https://unpkg.com/@preventor/invitation"></script>
```
NPM
```
npm install @preventor/invitation
``` 

### 3. Initialize configuration
```
<script>
  window.PvtInvitationSDK = {
     brokerId: 'YOUR_BROKER_ID',
     credentials: {
        apiKey: 'YOUR_API_KEY',
        clientSecret: 'YOUR_CLIENT_SECRET',
        tenant: 'YOUR_TENANT',
        banknu: 'YOUR_BANKNU',
        env: 'YOUR_ENV',
     },
   };
   const component = document.querySelector('pvt-invitation');
   component.open();
</script>
```