You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A very common reoccurring question is why we are using graphql in a space that it's not normally associated with. Documenting this will help users understand our design better and alleviate understandable initial skepticism
One of the important aspects here, which also partially addresses the related question of "why not grpc/protobuf", is that graphql is not only a schema definition language, it is also an operation definition language and a graph execution framework. See their docs on the execution model.
Early on we tried grpc but things started to get complicated when we were trying to do things like compose operation outputs+inputs. At the time, I think this was in the context of trying to lazily map the output of one action to the input of another action, but I think it's not hard to see how the general idea of a language for representing graphs of operations is extremely useful and helpful for our use case (given we are built on top of a DAG execution engine, BuildKit).
We went down the route of trying to layer something like that on top of grpc, which I think we got to technically kind of work but it was extremely complicated and difficult to think about.
Contrast this with graphql where the entire framework is centered around the idea of composing graphs of operations. That central idea is baked into the schema definition language, the operations (i.e. queries) and the aforementioned execution model. I think this is the central reason why everything starting clicking after we tried out graphql.
The above is mostly centered around why graphql was a good fit for us as cloak developers. That's just one aspect of it though, there are also many benefits for end users in terms of graphql being a widely popular framework with tons of slick tooling, being fairly intuitive and simple (yet powerful), etc. Those are all also worth expanding on more in our final docs here.
Activity
sipsma commentedon Sep 14, 2022
One initial braindump:
One of the important aspects here, which also partially addresses the related question of "why not grpc/protobuf", is that graphql is not only a schema definition language, it is also an operation definition language and a graph execution framework. See their docs on the execution model.
Early on we tried grpc but things started to get complicated when we were trying to do things like compose operation outputs+inputs. At the time, I think this was in the context of trying to lazily map the output of one action to the input of another action, but I think it's not hard to see how the general idea of a language for representing graphs of operations is extremely useful and helpful for our use case (given we are built on top of a DAG execution engine, BuildKit).
We went down the route of trying to layer something like that on top of grpc, which I think we got to technically kind of work but it was extremely complicated and difficult to think about.
Contrast this with graphql where the entire framework is centered around the idea of composing graphs of operations. That central idea is baked into the schema definition language, the operations (i.e. queries) and the aforementioned execution model. I think this is the central reason why everything starting clicking after we tried out graphql.
The above is mostly centered around why graphql was a good fit for us as cloak developers. That's just one aspect of it though, there are also many benefits for end users in terms of graphql being a widely popular framework with tons of slick tooling, being fairly intuitive and simple (yet powerful), etc. Those are all also worth expanding on more in our final docs here.
sipsma commentedon Dec 21, 2022
We have some initial docs now: https://docs.dagger.io/api/975146/concepts
This should be expanded as we e.g. introduce extensions but that can be tracked separately at that time