Prisma 1 Documentation

repository·master·Indexed 29 days ago

https://github.com/prisma/prisma1

Prisma 1 is a realtime GraphQL database layer and data access layer that provides a type-safe, auto-generated GraphQL client (SDK). It supports MySQL, PostgreSQL, and MongoDB, offering features like realtime event subscriptions, automatic migrations, and end-to-end type safety. Note: Prisma 1 was deprecated on September 1st, 2022.

Tokens
1.9M
Snippets
6K
Records
8.9K
Agent score
76%

What's inside prisma1

  1. Overview of the Prisma GraphQL API

    master

    Every Prisma service exposes a Prisma API, which is a GraphQL API providing CRUD (Create, Read, Update, Delete) and realtime operations for the types defined in your service's datamodel.

    The Prisma GraphQL schema is automatically generated by Prisma based on your datamodel. This schema defines all available types and operations for your specific service.

  2. Overview of the Prisma Client

    master
    The Prisma client is an auto-generated library designed to connect to your Prisma service. It provides a type-safe interface for interacting with your data, supporting various operations including reading, writing, realtime subscriptions, and sending raw GraphQL requests. It is available for JavaScript, TypeScript, and Go.
  3. Overview of running Prisma servers

    master

    Prisma services are hosted on Prisma servers. To manage a production-ready environment, you need to configure, launch, maintain, and monitor these servers. Depending on your needs, you can run Prisma in several ways:

    • Local Setup: Run Prisma locally using Docker with a local database.
    • Prisma Cloud (Demo Servers): Use free demo servers provided by Prisma Cloud for prototyping and learning.
    • Docker Deployment: Configure and run a Prisma server using Docker containers.

    Key management tasks include using the Management API to deploy and manage services, configuring Authentication & Security to protect your server, and understanding how Database Connectors interface with your data.

  4. Overview of the Prisma Client

    master
    The Prisma client is an auto-generated library designed to connect directly to your Prisma service. It provides a type-safe interface for performing basic data access operations, including reading and writing data, as well as advanced features like realtime subscriptions, existence checks, and sending raw GraphQL requests.
  5. Overview of Prisma Client

    master
    The Prisma Client is the auto-generated, type-safe SDK used to interact with your Prisma services. It provides a programmatic interface for performing data access operations including reading, writing, and real-time subscriptions. The client is specifically tailored to your unique datamodel, ensuring end-to-end type safety between your schema and your application code.
  6. Overview of Prisma Client

    master
    The Prisma client is an auto-generated library designed to connect to your Prisma service. It provides a type-safe interface for performing data access operations, including reading and writing data, utilizing realtime features, and executing GraphQL requests. The client is language-specific, with support for JavaScript, TypeScript, and Go.
  7. Overview of the Prisma Client

    master
    The Prisma client is an auto-generated library designed to connect to your Prisma service. It provides a type-safe interface for interacting with your data, supporting various operations including reading, writing, and real-time subscriptions. The client is language-specific (supporting JavaScript, TypeScript, and Go) and is generated based on your specific data model.
  8. Overview of GraphQL server hosting options

    master

    When building a GraphQL server based on Prisma, you must host the server to make its functionality available to clients. Common hosting options include:

    • Zeit Now: A one-click deployment tool for web applications.
    • Apex Up: Allows deployment of traditional web servers to AWS Lambda.
    • Serverless Functions: Using providers like AWS Lambda, Google Cloud, or Microsoft Azure via the Serverless Framework (Note: Subscriptions are not supported in this model).
  9. Overview of Prisma Admin

    master

    Prisma Admin is a graphical interface for interacting with your Prisma service. It allows you to:

    • Query and visually interact with your data using GraphQL.
    • Modify data: Create, update, and delete database records through a GUI.
    • Render data with custom UI components: Use experimental custom components to visualize data.

    All database writes in the UI follow a two-step process: first, make local changes in the interface (which will be highlighted), and second, click the Save to Database button in the bottom-right corner to commit those changes to the database.

  10. Overview of Prisma Admin

    master

    Prisma Admin is a GUI for interacting with your database through your Prisma service. It allows you to:

    • Query and visually interact with your data.
    • Modify and add new data to your database via a two-step confirmation process.
    • Render data using custom UI components (experimental).

    The interface is divided into four main areas:

    • Sidebar: Lists all available queries and mutations (defaults to one query per model).
    • Query area: Where you write GraphQL to read or write data.
    • Result area: Displays the results of your queries/mutations. You can filter, sort, paginate, and select specific columns here.
    • Detail area: Provides an in-depth view of a selected record using a Form view (default), a JSON view, or a custom UI component.
  11. Overview of Prisma Server deployment types

    master

    Prisma APIs are hosted on Prisma servers, which provide the runtime environment. There are three deployment types:

    • Local / self-hosted: Managed via Docker. You can host these locally or on a cloud provider.
    • Prisma Sandbox (Prisma Cloud): Free development servers for prototyping. These are subject to rate limits (10 requests per 10 seconds) and a 100 MB storage limit.
    • Private servers (Prisma Cloud): Connected to your own provisioned database.

    For production, use private or self-hosted servers.

    Deployment Behavior

    When running prisma deploy:

    • If endpoint is specified in prisma.yml, the CLI deploys directly to that endpoint.
    • If endpoint is not specified, the CLI wizard will prompt you to construct an endpoint, deploy the API, and save the endpoint to prisma.yml. To re-run the wizard, use prisma deploy --new or manually remove the endpoint from prisma.yml.