Has there been any consideration for creating a simple and modular way to distribute a set schema + lambda?. This will allow the community to extend the functionality of Slash Graphql with all sorts of things. Imaging something like Stripe integration module were the user only needs to upload a zip, give the link to a repo, or better yet, click install in the admin.
What a wonderful idea. I’d imagine people being able to share snippets of their schemas.
cc @hardik let’s put this on some list
Isn’t this already available with Slash CLI? You just have to chain commands together. I guess the commands could be chained together internally.
I think what was meant is a repository of commonly used schema types/fields and their respective lambda functions.
Here’s an example:
Imagine this schema being in a community repository for mardownifying text:
type MD {
id: ID!
raw: String!
cooked: String
}
type Mutation {
newMD(raw: String): ID! @lambda
}
and then some JavaScript function that markdownifies a raw string…
Then if I want to have markdown, I just click install and I can do this in my own schema:
type Post {
id: ID!
user: ...
md: MD # "imported"
}
What a world would that be!
This would also allow us to optimize lambda functions by providing high performance kernels for frequently used lambda functions.
@chewxy exactly!, if there was a standardized module format and tools for distribution and discovery (Slash APIs), I believe even more complex functionality could be shared.
What world would that be indeed!
Let me take this up for the roadmap discussion
That would be also nice for auth rules. Once you you created some (generic) rules, you import them in any of your projects