I'm a Web3 developer, more on me: https://ianh.xyz.
ian / rel Goto Github PK
View Code? Open in Web Editor NEWRel is a Graph Database BaaS, built on Redis.
License: MIT License
Rel is a Graph Database BaaS, built on Redis.
License: MIT License
I'm a Web3 developer, more on me: https://ianh.xyz.
Reference:
Why? Mostly because it's lexicographically sortable, case-insensitive and URL-safe
I suggest we have a endpoints
folder where the user is able to add custom functions where GraphQL is not the answer. We might add the generated GraphQL client there for them to use it too.
Let's include an auto-generated client library to be regenerated anytime the schema changes.
Options:
Following the quickstart, go thru the CLI and set up the project.
โ mkdir rel-playground
โ cd rel-playground
โ rel-playground npm init --y
Wrote to /Users/danielstarns/code/rel-playground/package.json:
{
"name": "rel-playground",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
}
โ rel-playground npx rel-cmd@latest init
Need to install the following packages:
rel-cmd@latest
Ok to proceed? (y) y
___ _
| _ \___| |
| / -_) |
|_|_\___|_| Installer
Rel is the zero-config backend framework for Javascripters.
? What's the name of your project? api
โ Rel packages installed
? Base directory for Rel project? .
Success! Created reljs at directory /Users/danielstarns/code/rel-playground/api
Next steps:
1. Run rel dev and visit https://localhost:4000
2. Edit ./schema.graphql to update your schema.
3. Read more documentation at https://rel.run/docs
The following files are generated:
โ rel-playground ls
api package.json
โ rel-playground ls api
node_modules package.json schema.graphql
package-lock.json rel.config.json
โ rel-playground
Then when I run rel dev
I get an error stating:
zsh: command not found: rel
Add in support for graphql-shield
and add directives / custom guards support.
All of our CYPHER is Neo4j compliant, so there's no reason we can't support Neo4j backends. This will likely cripple background jobs without a Redis server but that's easily to add.
Add a @fake
directive to type definition so the user can prototype something fast. Need to investigate what library is good now that faker.js is gone
This is the server-side issue for #12
Currently the API supports only one field for sorting, should be a array and leveraging the enum we are generating now for aggregations.
This will be helpful to connect to remote endpoints, or even the custom endpoints the user creates on his side, through GraphQL.
We already have streams being added data on mutation, we can intercept them with a exclusive consumer group to handle caching
At some point we want to invest in our CLI tooling.
TODO:
""" @model """
type Note {
id: ID!
""" @constraint(min: 10, max: 100) """
title: String!
description: String
""" @constraint(default: 0) """
likes: Int
}
This will be a central directive to add traditional DB checks like UNIQUE and DEFAULT, and also validate content if the user needs something outside graphql-scalars which we already support.
The custom validations will probably leverage fastest-validator and validator
Right now we are on GraphQL 15.8.
Right now the tests we create (https://github.com/rel-js/rel/tree/main/packages/runtime-redisgraph/tests) are validating only the RedisGraph runtime and the schema codegen. We need a test suite validating the whole stack.
The Graphback annotations don't make justice to the potential a graph database has. We should think about a @relation annotation suited to RedisGraph strengths.
@ian can share his experience leveraging geo on RedisGraph
We support the rel directive for relationships but need to add add support for mutations:
@thelinuxlich found a cool SM library that would be really easy to integrate as a Rel extension:
https://github.com/StoneCypher/jssm
What if we expose this as a directive. Consider:
type Post {
state: String! @stateMachine('draft -> published -> archived')
}
This would produce:
type Post {
id: ID!
state: String!
}
type Mutation {
nextStateMachineForPost(id: ID!): Post
prevStateMachineForPost(id: ID!): Post
setStateMachineForPost(id: ID!): Post
}
Added in ece0cc2
Migrate auth code over, use a lot of the providers from next-auth.
Since it's obligatory, the user shouldn't need to care about it.
Once the graphback legacy is finally removed, we should add changesets to manage releases
Aggregations should support a optional distinct argument to remove duplicates.
Right now mutation events are added indefinitely to their respective streams, which means they stay there forever until a client gets the message and ACK's it.
A @lambda annotation would allow a transient and derived field available only on queries:
"""@model"""
type User {
id: ID!
name: String!
lastName: String!
"""@lambda"""
fullName: String!
}
Then Rel would scan at startup a lambda folder and use fullName.js to derive the field on queries:
// fullName.js
export default (entity) => entity.name + " " + entity.lastName
For example, Post has many Comments, therefore it could have a comments_count field automatically generated and maintained by Rel.
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.