New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

prisma

Package Overview
Dependencies
Maintainers
4
Versions
9168
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prisma

Prisma is a realtime GraphQL database layer. Connect directly from the frontend or build your own GraphQL server.

Source
npmnpm
Version
1.4.0-beta.0
Version published
Weekly downloads
8.8M
-9.01%
Maintainers
4
Weekly downloads
 
Created
Source

WebsiteDocsBlogForumSlackTwitter

Slack Status npm version

Prisma - turn your database into a GraphQL API. Prisma lets you design your data model and have a production ready GraphQL API online in minutes.

The Prisma GraphQL API provides powerful abstractions and building blocks to develop flexible, scalable GraphQL backends:

  • Type-safe API that can be used from frontend and backend, including filters, aggregations and transactions.
  • Data modeling with declarative SDL. Prisma migrates your underlying database automatically.
  • Realtime API using GraphQL Subscriptions.
  • Advanced API composition using GraphQL Bindings and schema stitching.
  • Works with all frontend frameworks like React, Vue.js, Angular (Quickstart Examples).

Contents

Quickstart

Watch this 5 min tutorial or follow the steps below to get started with Prisma:

  • Install the CLI via NPM:
npm install -g prisma
  • Create a new service:

The following command creates all files you need for a new service.

prisma init
  • Define your data model:

Edit datamodel.graphql to define your data model using the GraphQL SDL notation.

type Tweet {
  id: ID! @unique
  createdAt: DateTime!
  text: String!
  owner: User!
  location: Location!
}

type User {
  id: ID! @unique
  createdAt: DateTime!
  updatedAt: DateTime!
  handle: String! @unique
  name: String
  tweets: [Tweet!]!
}

type Location {
  latitude: Float!
  longitude: Float!
}
  • Deploy your service:

To deploy your service simply run the following command and select one of the hosted development clusters or setup a local Docker-based development environment:

prisma deploy
  • Connect to your GraphQL endpoint:

Use the endpoint from the previous step in your frontend (or backend) applications to connect to your GraphQL API.

7 Read more in the dedicated quickstarts for your favorite technology

Examples

Architecture

Prisma is a secure API layer that sits in front of your database. Acting as a proxy, Prisma exposes a powerful GraphQL API and manages Rate-Limiting, Authentication, Logging and a host of other features. Because Prisma is a standalone process, it can be scaled independently from your application layer and provide scalable subscriptions infrastructure.

Supported Databases

Prisma can be used for MySQL Databases out of the box. More databases connectors will follow:

Join the discussion or contribute to influence which we'll work on next!

GraphQL API

The most important component in Prisma is the GraphQL API:

  • Query, mutate & stream data via GraphQL CRUD API
  • Define and evolve your data model using GraphQL SDL

Try the online demo: open GraphQL Playground

Community

Prisma has a community of thousands of amazing developers and contributors. Welcome, please join us! 👋

Contributing

Your feedback is very helpful, please share your opinion and thoughts!

Keywords

prisma

FAQs

Package last updated on 01 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts