Skip to content

Finish project API #5144

Closed as not planned
Closed as not planned

Description

@sipsma

A first take was merged here: #5060

We need to:

  1. Bikeshed it more
  2. Add support for command invocation

Here's the current graphql schema:

extend type Query {
  "Load a project from ID."
  project(id: ProjectID): Project!

  "Load a project command from ID."
  projectCommand(id: ProjectCommandID): ProjectCommand!
}

"A unique project identifier."
scalar ProjectID

"A unique project command identifier."
scalar ProjectCommandID

"A collection of Dagger resources that can be queried and invoked."
type Project {
  "A unique identifier for this project."
  id: String!

  "Initialize this project from the given directory and config path"
  load(source: DirectoryID!, configPath: String!): Project!

  "Name of the project"
  name: String!

  "Commands provided by this project"
  commands: [ProjectCommand!]
}

"A command defined in a project that can be invoked from the CLI."
type ProjectCommand {
  "A unique identifier for this command."
  id: String!

  "The name of the command."
  name: String!

  "Flags accepted by this command."
  flags: [ProjectCommandFlag!]

  "Documentation for what this command does."
  description: String

  "Subcommands, if any, that this command provides."
  subcommands: [ProjectCommand!]
}

"A flag accepted by a project command."
type ProjectCommandFlag {
  "The name of the flag."
  name: String!

  "Documentation for what this flag sets."
  description: String
}

To start, we can use this issue for bikeshedding. I am also happy to create a dummy PR if others think that will make it easier to discuss.

cc @shykes

Activity

  1. helderco commented on Jun 12, 2023

    @helderco
    Contributor

    I've got feedback that the name "Project" is confusing because you tend to equate that with your repo. While we can say that a general project (app, repo) can have multiple dagger projects, I agree that maybe we can find another term that's less conflicting.

  2. sipsma commented on Apr 2, 2024

    @sipsma
    ContributorAuthor

    Ancient issue, replaced by moduels

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions