prisma / prisma1 Goto Github PK
View Code? Open in Web Editor NEWπΎ Database Tools incl. ORM, Migrations and Admin UI (Postgres, MySQL & MongoDB) [deprecated]
Home Page: https://v1.prisma.io/docs/
License: Apache License 2.0
πΎ Database Tools incl. ORM, Migrations and Admin UI (Postgres, MySQL & MongoDB) [deprecated]
Home Page: https://v1.prisma.io/docs/
License: Apache License 2.0
Support location field type in Model. This is an important feature for integration with Algolia.
ex:
_geoloc: {
lat: 40.639751,
lng: -73.778925
}
It must be also possible to have a list of locations. Use case where one wants to record the last 3 locations the user visited in database.
ex:
_geoloc: [
{ "lat": 47.279430, "lng": 5.106450 },
{ "lat": 47.293228, "lng": 5.004570 },
{ "lat": 47.316669, "lng": 5.016670 }
]
In some cases it might be needed to provide a custom plural name of a model.
Here is how it could be configured in the datamodel:
type Person @plural(name: "People") {
name: String!
}
Extend nested mutation feature to include delete mutations. Helpful when you have dependent children and want to delete them given the deletion of the parent. Might look like:
mutation deleteCategory($id: ID!) {
deleteCategory(id: $id, subCategories: ALL) {
id
}
}
Would be great if something like the following would work:
mutation {
createItem(
title: "Hello world"
subitems: [{
title: "sub item 1"
}, {
title: "sub item 2"
}]
}
Add a toggle to make relation fields required, just like you can with scalar fields, when creating a node.
When creating an action, the dashboard description says you can pick a model/relation. However, the dashboard does not have relations in the dropdown, only models.
Please add relations to action triggers as that seems like a very common scenario. For instance if I had a post model and say I created a many to many relationship with users, calling it "sharedWith", where I send an email to anyone I share the post with.
lat
and lng
float fieldsHere are some more relevant/related links:
It could be useful to disable HTTP access to a project similar to Heroku, for example:
Add ability to filter on related nodes. For example, getting only User
s which have associated Track
s:
{
viewer {
allUsers(filter: ???) {
edges {
node {
slug
tracks {
edges {
node {
title
}
}
}
}
}
}
}
}
Without filter, this could return:
{
"data": {
"viewer": {
"allUsers": {
"edges": [
{
"node": {
"slug": "user-without-tracks",
"tracks": {
"edges": []
}
}
},
{
"node": {
"slug": "user-with-tracks",
"tracks": {
"edges": [
{
"node": {
"title": "Some Awesome Track"
}
}
]
}
}
}
]
}
}
}
}
user-without-tracks
shouldn't be returned.
Maybe this relates to https://github.com/graphcool/feature-requests/issues/2.
Hi,
Auth0 is nice for free dev but it can reach $745/mo
in prod too.
So the question is do you have other way to so social login?
For example : https://www.reindex.io/docs/security/authentication/#social-login-authentication-providers
Thanks
React apps can use libraries such as isomorphic-relay
to get server-side rendering for the initial page render. However such libraries require running on a dedicated GraphQL server, but there is no such server when using graph.cool as a backend. It would thus be great for graph.cool to provide these HTML and JS pre-rendering endpoints.
When working with projects you sometimes want to have multiple staged environments. The easiest way to get there, for now, is to clone an existing project.
When cloning a project you can choose one of the following options:
Would be awesome if we could fire mutation callbacks with fake data without creating/updating/deleting an actual node.
For the reasons described here: https://github.com/graphcool/dashboard/issues/294
To make auth0 user integration simpler, allow an insert into createUser by auth0 userId rather than an auth0 token. This could be restricted to admin roles.
Auth0 has a server side rule trigger than can post user data and userId to an http endpoint on user registration. Unfortunately, it doesn't have a userId token that it can pass along to the graphcool endpoint.
This would make auth0 integration pretty simple.
Use case:
My user model has two unique keys. a) GraphQLID b) FacebookId. Would be great to update the User Model directly via the FacebookId without the need to first query the GraphQLID.
Example:
updateUser(idFb:"12233232", state: MAIN)
{
state
}
Can we have some simple additional constraints like length for String attributes, or checking that a String is an email or that an Int is not negative?
A panel that displays incoming requests and responses to the project and aggregates all errors for easy viewing. Maybe this could be part of a graphcool CLI?
This feature request comes from my experience on graphcool as user and it's something that i needed that i think could be useful for everyone, under certain circumstances.
the user had to setup multiple models, some of them has a lot of fields and they are similar to each other.
the user has to create every field of every model manually, consuming a lot of time on models with fields that he/she has already created
a possible solution would be placing a 'duplicate' or 'copy' button on the console interface, on the model name row, or inside the model page that creates a new model called, for example, _1, that already contains every field existing on the origin model.
If for some reason a field or a relation cannot be duplicated the user should have a warning on screen.
It should be possible to configure cascading deletes on relations.
If a user has many posts, it should be possible to specify that if a a user is deleted all associated posts should also be deleted.
We need to consider what should happen if a user is not delete, but all posts are removed from the relation. In traditional relational databases this scenario is not relevant as you can only have cascading deletes in association with foreign key constraints.
Related to but not a duplicate of #42
Tiny feature but it would be neat to set a project ID alias for use in the API endpoint URL
Due to our rate limiting, it's fairly important to have usage statistics.
As pointed out by @Brene the url could be https://dashboard.graph.cool/{project}/account/usage
It should be possible to provide a override pluralisation value for each model in cases where the default doesn't make sense.
The Email Auth Provider should support:
Currently when you do a mutation, you just have createPost(field1, field2, ... , fieldN)
, which means it's quite difficult to use variables on complex mutations.
A better route would be to allow a input type
, for instance: createPost(post: Post)
β in this case just using the Post
type.
A further extension on this would be to allow using "Input Types", which are effectively subsets of the entity's Type, for instance: createPost(post: CreatePostInput)
Where Post
is defined as:
type Post {
id: ID!
createdAt: DateTime
updatedAt: DateTime
title: String!
body: String!
poster: User!
}
And CreatePostInput
is defined as:
type CreatePostInput {
title: String!
body: String!
}
By allowing these "Input Types", we can effectively achieve finer grain creation. It also prevents code like the following (taken from graphql-training/graphql-training.github.io)
// You can also use `graphql` for GraphQL mutations
export default graphql(gql`
mutation createTrainingRequest(
$name: String!
$email: String!
$companyName: String
$attendees: Int!
$modules: [TRAINING_REQUEST_MODULES!]!
$additionalDetails: String
$city: String!
$country: String!
$diversityRequested: Boolean!
$onsiteRequested: Boolean!
) {
createTrainingRequest(
name: $name
email: $email
companyName: $companyName
attendees: $attendees
modules: $modules
additionalDetails: $additionalDetails
city: $city
country: $country
diversityRequested: $diversityRequested
onsiteRequested: $onsiteRequested
) {
id
}
}
`)(RequestForm);
Instead, I could've just done:
// You can also use `graphql` for GraphQL mutations
export default graphql(gql`
mutation createTrainingRequest(
$trainingRequest: CreateTrainingRequestInput!
) {
createTrainingRequest(trainingRequest: $trainingRequest) {
id
}
}
`)(RequestForm);
Make field constraints much more flexible.
This feature can probably be delivered in smaller chunks
Use case 1
A phone number field should match a regex
Use case 2
A phone number field should be required if and only if the roles field is STORE_MANAGER
Use case 3
A money field should only allow prime numbers
Example - A post object is required to have an author.
In this case a Post's relation to the user via the Author field should be required.
The required constraint functionality exists currently for fields but not for relations.
Can we have an optional extra field on action to be able to set a secret that we can validate on the webhook server's side. Github's implementation seems solid.
https://developer.github.com/webhooks/securing/
It just involves hashing the secret and attaching it to the "X-Hub-Signature" header when you make the POST request
I want to create two models, User
and Org
which both have a slug
, ensuring that this slug is unique across all users and orgs (similar to GitHub and such sites). I don't think graph.cool currently allows this?
A Stripe template should be added to https://github.com/graphcool/templates.
Use functions to extend your project's GraphQL schema.
Currently each model gets an update and a create mutation. Performing an update or create if needed requires an additional query to be performed before the mutation.
A possible solution could be an upsertModel
mutation that would try and query the model by one of the passed fields instead of a passed ID (still need to come up with a smart way of defining which field should be used for the lookup) and updates the row. If no model object matches the query a new one will be created with the passed parameters.
For the upsert mutation the parameter signatures would be similar as for the create mutation. All fields that are required for create need to be required for upsert (contrary to update where every field besides the id
is optional).
Thanks to @sedubois for bringing this up: https://github.com/graphcool/dashboard/issues/234
Example: If a user creates an account through Auth0 username/password (auth|etc...
) and then later returns to the site and attempts to login with facebook, a new account will be created (facebook|etc...
). If the Auth0 Admin has created a rule that automerges accounts, the original username/password account will get merged on the auth0 database with the facebook one under the facebook auth0id. If the user then attempts to login to their graph.cool app with the original Auth0 username/password credentials, they'll find that they are now in their second duplicate facebook account and that their original account is unreachable (two accounts exist on the graph.cool dbββone for the facebook|...
and one for the auth|...
but only one account exists on the auth0 database with both identities merged under a single id).
String:
Int, Float:
, <, ==, ...
Datetime:
Allow multiple relations with the same relationship. Would have to have user named field names instead of defaulting to the model name. Example: Say we have two models, Category and SubCategory. Want to be able to create two relations in Category, both to SubCategory. Might name the relations "SubCategoryGroup1" and "SubCategoryGroup2", and have the reciprocal names on the SubCategory model be "CategoryGroup1" and "CategoryGroup2".
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.