Skip to content

Instantly share code, notes, and snippets.

@wpbonelli
Last active June 11, 2020 22:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wpbonelli/ac73d9430236b1947a4a202ad1143392 to your computer and use it in GitHub Desktop.
Save wpbonelli/ac73d9430236b1947a4a202ad1143392 to your computer and use it in GitHub Desktop.
Start Dagster pipeline via GraphQL API

GraphQL:

mutation ($executionParams: ExecutionParams!) {
  startPipelineExecution(executionParams: $executionParams) {
    ...startPipelineExecutionResultFragment
  }
}

fragment startPipelineExecutionResultFragment on StartPipelineExecutionResult {
  __typename
  ... on InvalidStepError {
    invalidStepKey
  }
  ... on InvalidOutputError {
    stepKey
    invalidOutputName
  }
  ... on PipelineConfigValidationInvalid {
    pipelineName
    errors {
      __typename
      message
      path
      reason
    }
  }
  ... on PipelineNotFoundError {
    message
    pipelineName
  }
  ... on PythonError {
    message
    stack
  }
  ... on StartPipelineRunSuccess {
    run {
      runId
      status
      pipeline {
        name
      }
      environmentConfigYaml
      mode
    }
  }
  ... on PipelineRunConflict {
    message
  }
}

Variables:

{
  "executionParams": {
    "selector": {
      "name": "..."
    },
    "mode": "...",
    "environmentConfigData": {
      ...
    }
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment