This repository has been archived by the owner on Sep 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 859
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1651 from graphcool/prisma-cli
Prisma cli
- Loading branch information
Showing
265 changed files
with
12,896 additions
and
14,092 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ node_modules | |
dist | ||
.idea | ||
.DS_Store | ||
.envrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,153 @@ | ||
<p align="center"><a href="https://www.graph.cool"><img src="https://imgur.com/he8RLRs.png"></a></p> | ||
<a href="https://www.prismagraphql.com"><img src="https://imgur.com/HUu10rH.png" width="248" /></a> | ||
|
||
[Website](https://www.graph.cool/) • [Docs](https://graph.cool/docs/) • [Blog](https://blogs.graph.cool/) • [Forum](https://www.graph.cool/forum) • [Slack](https://slack.graph.cool/) • [Twitter](https://twitter.com/graphcool) | ||
[Website](https://www.prismagraphql.com) • [Docs](https://www.prismagraphql.com/docs/) • [Blog](https://blog.graph.cool/) • [Forum](https://www.graph.cool/forum) • [Slack](https://slack.graph.cool/) • [Twitter](https://twitter.com/graphcool) | ||
|
||
**The Graphcool backend development framework** is designed to help you develop and deploy production-ready GraphQL microservices. With Graphcool you can design your data model and have a production ready [GraphQL](https://www.howtographql.com/) API online in minutes. | ||
[![Slack Status](https://slack.graph.cool/badge.svg)](https://slack.graph.cool) [![npm version](https://badge.fury.io/js/graphcool.svg)](https://badge.fury.io/js/graphcool) | ||
|
||
The framework integrates with cloud-native serverless functions and is compatible with existing libraries and tools like [GraphQL.js](https://github.com/graphql/graphql-js) and [Apollo Server](https://github.com/apollographql/apollo-server). Graphcool comes with a CLI and a Docker-based runtime which can be deployed to any server or cloud. | ||
**Prisma - turn your database into a GraphQL API**. Prisma lets you design your data model and have a production ready [GraphQL](https://www.howtographql.com/) API online in minutes. | ||
|
||
<!-- | ||
Add note that Graphcool can still be used with other langs via webhooks?? | ||
The Prisma GraphQL API provides powerful abstractions and building blocks to develop flexible, scalable GraphQL backends: | ||
|
||
1. **Type-safe API** that can be used from frontend and backend, including filters, aggregations and transactions. | ||
2. **Data modeling** with declarative SDL. Prisma migrates your underlying database automatically. | ||
3. **Realtime API** using GraphQL Subscriptions. | ||
4. **Advanced API composition** using GraphQL Bindings and schema stitching. | ||
5. **Works with all frontend frameworks** like React, Vue.js, Angular ([Quickstart Examples](https://www.prismagraphql.com/docs/quickstart/)). | ||
|
||
## Contents | ||
|
||
<!-- | ||
<img align="right" width="400" src="https://imgur.com/EsopgE3.gif" /> | ||
--> | ||
|
||
The framework provides powerful abstractions and building blocks to develop flexible, scalable GraphQL backends: | ||
1. **GraphQL database** to easily evolve your data schema & migrate your database | ||
2. **Flexible auth** using the JWT-based authentication & permission system | ||
3. **Realtime API** using GraphQL Subscriptions | ||
4. **Highly scalable architecture** enabling asynchronous, event-driven flows using serverless functions | ||
5. **Works with all frontend frameworks** like React, Vue.js, Angular ([Quickstart Examples](https://graph.cool/docs/quickstart/)) | ||
* [Quickstart](#quickstart) | ||
* [Examples](#examples) | ||
* [Architecture](#architecture) | ||
* [Supported Database](#supported-databases) | ||
* [GraphQL API](#graphql-api) | ||
* [Community](#community) | ||
* [Contributing](#contributing) | ||
|
||
## Community | ||
## Quickstart | ||
|
||
Graphcool has a community of thousands of amazing developers and contributors. Welcome, please join us! 👋 | ||
[Watch this 5 min tutorial](https://www.youtube.com/watch?v=g0wFABHMzL4) or follow the steps below to get started with Prisma: | ||
|
||
- [Forum](https://www.graph.cool/forum) | ||
- [Slack](https://slack.graph.cool/) | ||
- [Stackoverflow](https://stackoverflow.com/questions/tagged/graphcool) | ||
- [Twitter](https://twitter.com/graphcool) | ||
- [Facebook](https://www.facebook.com/GraphcoolHQ) | ||
- [Meetup](https://www.meetup.com/graphql-berlin) | ||
- [Email](hello@graph.cool) | ||
1. **Install the CLI via NPM:** | ||
|
||
```sh | ||
npm install -g prisma-cli | ||
``` | ||
|
||
## Contributing | ||
2. **Create a new service:** | ||
|
||
Your feedback is **very helpful**, please share your opinion and thoughts! | ||
The following command creates all files you need for a new [service](https://www.prismagraphql.com/docs/reference/service-configuration/overview-ieshoo5ohm). | ||
|
||
```sh | ||
prisma init | ||
``` | ||
|
||
3. **Define your data model:** | ||
|
||
Edit `datamodel.graphql` to define your data model using the [GraphQL SDL notation](https://www.prismagraphql.com/docs/reference/service-configuration/data-modelling-(sdl)-eiroozae8u). | ||
|
||
```graphql | ||
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! | ||
} | ||
``` | ||
|
||
5. **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: | ||
|
||
```sh | ||
prisma deploy | ||
``` | ||
|
||
6. **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** | ||
|
||
[![](https://imgur.com/T5nakij.png)](https://www.prismagraphql.com/docs/quickstart/) | ||
|
||
## Examples | ||
|
||
### +1 an issue | ||
- [demo-application](https://github.com/graphcool/graphql-server-example) | ||
- [auth](examples/auth) | ||
- [file-api](examples/file-api) | ||
- [github-auth](examples/github-auth) | ||
- [permissions](examples/permissions) | ||
- [resolver-forwarding](examples/resolver-forwarding) | ||
- [rest-wrapper](examples/rest-wrapper) | ||
- [subscriptions](examples/subscriptions) | ||
|
||
If an existing feature request or bug report is very important for you, please go ahead and :+1: it or leave a comment. We're always open to reprioritize our roadmap to make sure you're having the best possible DX. | ||
|
||
### Requesting a new feature | ||
## 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. | ||
|
||
![](https://imgur.com/SdssPgT.png) | ||
|
||
## Supported Databases | ||
|
||
Prisma can be used for MySQL Databases out of the box. More databases connectors will follow: | ||
|
||
* [PostgreSQL Connector](https://github.com/graphcool/prisma/issues/1641) | ||
* [MS SQL Connector](https://github.com/graphcool/prisma/issues/1642) | ||
* [MongoDB Connector](https://github.com/graphcool/prisma/issues/1643) | ||
* [Oracle Connector](https://github.com/graphcool/prisma/issues/1644) | ||
* [ArangoDB Connector](https://github.com/graphcool/prisma/issues/1645) | ||
* [Neo4j Connector](https://github.com/graphcool/prisma/issues/1646) | ||
* [Druid Connector](https://github.com/graphcool/prisma/issues/1647) | ||
* [Dgraph Connector](https://github.com/graphcool/prisma/issues/1648) | ||
|
||
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](https://www.prismagraphql.com/features) | ||
|
||
## Community | ||
|
||
Prisma has a community of thousands of amazing developers and contributors. Welcome, please join us! 👋 | ||
|
||
* [Forum](https://www.graph.cool/forum) | ||
* [Slack](https://slack.graph.cool/) | ||
* [Twitter](https://twitter.com/graphcool) | ||
* [Facebook](https://www.facebook.com/GraphcoolHQ) | ||
* [Meetup](https://www.meetup.com/graphql-berlin) | ||
* [Email](hello@graph.cool) | ||
|
||
## Contributing | ||
|
||
Your feedback is **very helpful**, please share your opinion and thoughts! | ||
|
||
* [Request a new feature](https://github.com/graphcool/prisma/issues/new) | ||
* [Report a bug](https://github.com/graphcool/prisma/issues/new) | ||
* [Participate in existing discussions](https://github.com/graphcool/prisma/issues) | ||
|
||
We love your ideas for new features. If you're missing a certain feature, please feel free to [request a new feature here](https://github.com/graphcool/framework/issues/new). (Please make sure to check first if somebody else already requested it.) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.