graphql-authentication-prisma
TypeScript icon, indicating that this package has built-in type declarations

0.1.5 • Public • Published

GraphQL Authentication Prisma

A Prisma adapter for Graphql Authentication.

Install

Node v8+ should be used. Install with Yarn or npm:

yarn add graphql-authentication graphql-authentication-prisma email-templates
npm i graphql-authentication graphql-authentication-prisma email-templates

Usage with Prisma

You can read the guide below or checkout the example to see the full code.

Step 1

Read the Usage section in the full documentation first.

Step 2

After configuring the basics, you can now add this package as an adapter. Pseudo-code example:

import { GraphqlAuthenticationPrismaAdapter } from 'graphql-authentication-prisma';
 
graphqlAuthentication: graphqlAuthenticationConfig({
  adapter: new GraphqlAuthenticationPrismaAdapter({
    // Optional, defaults to 'db'
    prismaContextName: 'db'
  })
});

Step 3

In your Prisma datamodel.graphql file, add this User model. Run prisma deploy to run the migrations.

Full Documentation

Package Sidebar

Install

npm i graphql-authentication-prisma

Weekly Downloads

1

Version

0.1.5

License

ISC

Unpacked Size

35.4 kB

Total Files

13

Last publish

Collaborators

  • spacek33z