elsa-workflows / elsa-core

A .NET workflows library
https://v3.elsaworkflows.io/
MIT License
6.22k stars 1.13k forks source link

Complete GraphQL Endpoint #361

Open sfmskywalker opened 4 years ago

sfmskywalker commented 4 years ago

Work has already started on exposing a GraphQL endpoint to manage & execute workflows, but it needs to be finalized before we merge Elsa 2 into master.

The following list shows what's done & what is still open:

[x] List workflow definitions [x] List workflow instances [x] List activity definitions [x] Save workflow definition [x] Delete workflow definition [] Refactor to Hot Chocolate schema-first. [] Trigger workflow [] Start workflow [] Resume workflow

RingoKam commented 4 years ago

Hmm the big item I think is schema-first? Whats the advantage of schema first over code first? I have experience using Apollo GraphQL, maybe I can help.

EDIT: Nvm, just saw you have the reason on #360

Trigger/Start/Resume just need to be added as a mutation in graphQL right?

sfmskywalker commented 4 years ago

I don't know if there are any objective advantages of doing schema-first with Hot Chocolate's schema first approach, but I've used both strategies in practice, and personally prefer having a single .schema file that provides me with a complete overview of the available types. There are some other smaller details that I liked better. So really, it's just a personal preference.

Indeed, Trigger/Start/Resume just need to be added as a mutation ✔️

RingoKam commented 4 years ago

The current development branch for Elsa2.0 is feature/elsa-2.0 right? Whats the development workflow? I tried running the docker build file, ran into errors.

sfmskywalker commented 4 years ago

Yes, that’s the one. I’m not sure what you mean by development workflow, but what I’d do is fork the project, clone it to my local machine, work on things, and create pull requests.

Note that many things are a bit broken in Elsa 2. Some are small issues, others are bigger. Primarily, serialization is a mess after changes made to code-first workflows. Especially when one uses C# code expressions.

I recommend leaving the Dockerfile alone for now and just try and get the project to run on your local.

Let me know if you need help with that.

Thanks!

sfmskywalker commented 3 years ago

I decided GraphQL is not a requirement for Elsa 2.0. Instead, I will expose REST APIs, which are a bit easier to implement and arguably even more appropriate for the intended use cases. GraphQL can be done at a later stage.

mserey commented 3 years ago

Hi sfmskywalker When is Elsa 2.0 expected to be released and how to use it?

sfmskywalker commented 3 years ago

The goal is end of Q1. Documentation will have to be updated still, but you can already figure out how to use it by looking at the sample applications (in the samples folder).

mserey commented 3 years ago

thank you, we will be attentive