Skip to content
This repository has been archived by the owner on Jul 10, 2024. It is now read-only.

Commit

Permalink
🔥 Remove nexus plugin (#71)
Browse files Browse the repository at this point in the history
* remove nexus

* remove all nexus occurrences

* Rebase

Co-authored-by: Errorname <[email protected]>
  • Loading branch information
BjoernRave and Errorname authored Nov 1, 2020
1 parent 2a1b9e1 commit 13c73d6
Show file tree
Hide file tree
Showing 37 changed files with 308 additions and 8,198 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ Read more on how `prisma-multi-tenant` can help you achieve multi-tenancy for yo
- [How to integrate with:](/docs/integrations)
- [Express](/docs/integrations/Express.md)
- [Apollo](/docs/integrations/Apollo.md)
- [Nexus](/docs/integrations/Nexus.md)
- [Blitz](/docs/integrations/Blitz.md)
- [Redwood](/docs/integrations/Redwood.md)
- Bison (TODO)
Expand All @@ -115,7 +114,6 @@ Read more on how `prisma-multi-tenant` can help you achieve multi-tenancy for yo
- [Basic (TS)](/docs/examples/basic-ts)
- [Express](/docs/examples/express)
- [Apollo](/docs/examples/apollo)
- [Nexus](/docs/examples/nexus)
- [Blitz](/docs/examples/blitz)
- [Redwood](/docs/examples/redwood)
- Bison (TODO)
Expand Down
36 changes: 0 additions & 36 deletions docs/Complete_Documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Prisma-multi-tenant is a two-part project:

There are also plugins for Prisma-powered frameworks:

- The [Nexus plugin](#nexus-plugin) (`@prisma-multi-tenant/nexus`) which is a wrapper of the `nexus-plugin-prisma` package, and adds multi-tenancy to your Nexus application.
- The [Blitz plugin](#blitz-plugin) (`@prisma-multi-tenant/blitz`) which adds multi-tenancy to your Blitz application.
- The [Redwood plugin](#redwood-plugin) (`@prisma-multi-tenant/redwood`) which adds multi-tenancy to your Redwood application.

Expand All @@ -36,8 +35,6 @@ There are also plugins for Prisma-powered frameworks:
- [`deleteTenant`](#deletetenantname-string-promisevoid)
- [`existsTenant`](#existstenantname-string-promiseboolean)
- [`disconnect`](#disconnect-promisevoid)
- [Nexus plugin](#nexus-plugin)
- [`prismaMultiTenant`](#prismamultitenantsettings-multitenantsettings-runtimeplugin)
- [Blitz plugin](#blitz-plugin)
- [`multiTenantMiddleware`](#multiTenantMiddlewaretenantRouter-function-prismaoptions-prismaclientoptions-middleware)
- [Redwood plugin](#redwood-plugin)
Expand Down Expand Up @@ -416,39 +413,6 @@ Disconnects all PrismaClient instances (management & tenants)
await multiTenant.disconnect()
```

## Nexus plugin

### `prismaMultiTenant(settings: MultiTenantSettings): RuntimePlugin`

Registers the plugin into Nexus. You must give a `tenantRouter` attribute in the settings that will return the name of the tenant that should be used during this Request.

**Usage:**

```ts
import { use } from 'nexus'
import { prismaMultiTenant } from '@prisma-multi-tenant/nexus'

const tenantRouter = (req: Express.Request) => {
// The name can come from anywhere (headers, token, ...)
return 'my_tenant_A'
}

use(prismaMultiTenant({ tenantRouter }))
```

**Settings:**

Since `@prisma-multi-tenant/nexus` is a wrapper of `nexus-plugin-prisma`, any settings given will be passed through:

```js
use(
prismaMultiTenant({
tenantRouter,
features: { crud: true },
})
)
```

## Blitz plugin

### `multiTenantMiddleware(tenantRouter: Function, prismaOptions?: PrismaClientOptions): Middleware`
Expand Down
1 change: 0 additions & 1 deletion docs/Contributing_Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ Main packages:

Integrations packages:

- `@prisma-multi-tenant/nexus` found in `/packages/nexus`
- `@prisma-multi-tenant/blitz` found in `/packages/blitz`
- `@prisma-multi-tenant/redwood` found in `/packages/redwood`

Expand Down
1 change: 0 additions & 1 deletion docs/examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
- [Basic (TS)](/docs/examples/basic-ts)
- [Express](/docs/examples/express)
- [Apollo](/docs/examples/apollo)
- [Nexus](/docs/examples/nexus)
- [Blitz](/docs/examples/blitz)
- [Redwood](/docs/examples/redwood)
- Bison (TODO)
Expand Down
56 changes: 0 additions & 56 deletions docs/examples/nexus/README.md

This file was deleted.

32 changes: 0 additions & 32 deletions docs/examples/nexus/api.graphql

This file was deleted.

9 changes: 0 additions & 9 deletions docs/examples/nexus/api/app.ts

This file was deleted.

66 changes: 0 additions & 66 deletions docs/examples/nexus/api/graphql/Post.ts

This file was deleted.

24 changes: 0 additions & 24 deletions docs/examples/nexus/multi-tenancy-example.js

This file was deleted.

Loading

0 comments on commit 13c73d6

Please sign in to comment.