Skip to content

doc: Why GraphQL? #3014

Closed
Closed

Description

@sipsma

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

Activity

  1. sipsma commented on Sep 14, 2022

    @sipsma
    ContributorAuthor

    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.

  2. added this to the Cloak GA milestone on Sep 16, 2022
  3. transferred this issue fromdagger/cloakon Sep 16, 2022
  4. added
    area/engine
    and removed on Dec 5, 2022
  5. sipsma commented on Dec 21, 2022

    @sipsma
    ContributorAuthor

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/engine

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions