Exemple #1
0
class DauphinSubscription(dauphin.ObjectType):
    class Meta:
        name = 'Subscription'

    pipelineRunLogs = dauphin.Field(
        dauphin.NonNull('PipelineRunLogsSubscriptionPayload'),
        runId=dauphin.Argument(dauphin.NonNull(dauphin.ID)),
        after=dauphin.Argument('Cursor'),
    )

    def resolve_pipelineRunLogs(self, info, runId, after=None):
        return model.get_pipeline_run_observable(info, runId, after)
Exemple #2
0
 class Arguments:
     pipeline = dauphin.NonNull('ExecutionSelector')
     config = dauphin.Argument('PipelineConfig')
Exemple #3
0
class DauphinQuery(dauphin.ObjectType):
    class Meta:
        name = 'Query'

    version = dauphin.NonNull(dauphin.String)
    pipelineOrError = dauphin.Field(
        dauphin.NonNull('PipelineOrError'), params=dauphin.NonNull('ExecutionSelector')
    )
    pipeline = dauphin.Field(
        dauphin.NonNull('Pipeline'), params=dauphin.NonNull('ExecutionSelector')
    )
    pipelinesOrError = dauphin.NonNull('PipelinesOrError')
    pipelines = dauphin.Field(dauphin.NonNull('PipelineConnection'))

    configTypeOrError = dauphin.Field(
        dauphin.NonNull('ConfigTypeOrError'),
        pipelineName=dauphin.Argument(dauphin.NonNull(dauphin.String)),
        configTypeName=dauphin.Argument(dauphin.NonNull(dauphin.String)),
    )

    runtimeTypeOrError = dauphin.Field(
        dauphin.NonNull('RuntimeTypeOrError'),
        pipelineName=dauphin.Argument(dauphin.NonNull(dauphin.String)),
        runtimeTypeName=dauphin.Argument(dauphin.NonNull(dauphin.String)),
    )
    pipelineRuns = dauphin.non_null_list('PipelineRun')
    pipelineRun = dauphin.Field('PipelineRun', runId=dauphin.NonNull(dauphin.ID))

    isPipelineConfigValid = dauphin.Field(
        dauphin.NonNull('PipelineConfigValidationResult'),
        args={
            'pipeline': dauphin.Argument(dauphin.NonNull('ExecutionSelector')),
            'config': dauphin.Argument('PipelineConfig'),
        },
    )

    executionPlan = dauphin.Field(
        dauphin.NonNull('ExecutionPlanResult'),
        args={
            'pipeline': dauphin.Argument(dauphin.NonNull('ExecutionSelector')),
            'config': dauphin.Argument('PipelineConfig'),
        },
    )

    def resolve_configTypeOrError(self, info, **kwargs):
        return model.get_config_type(info, kwargs['pipelineName'], kwargs['configTypeName'])

    def resolve_runtimeTypeOrError(self, info, **kwargs):
        return model.get_runtime_type(info, kwargs['pipelineName'], kwargs['runtimeTypeName'])

    def resolve_version(self, _info):
        return __version__

    def resolve_pipelineOrError(self, info, **kwargs):
        return model.get_pipeline(info, kwargs['params'].to_selector())

    def resolve_pipeline(self, info, **kwargs):
        return model.get_pipeline_or_raise(info, kwargs['params'].to_selector())

    def resolve_pipelinesOrError(self, info):
        return model.get_pipelines(info)

    def resolve_pipelines(self, info):
        return model.get_pipelines_or_raise(info)

    def resolve_type(self, info, pipelineName, typeName):
        return model.get_pipeline_type(info, pipelineName, typeName)

    def resolve_pipelineRuns(self, info):
        return model.get_runs(info)

    def resolve_pipelineRun(self, info, runId):
        return model.get_run(info, runId)

    def resolve_isPipelineConfigValid(self, info, pipeline, config):
        return model.validate_pipeline_config(info, pipeline.to_selector(), config)

    def resolve_executionPlan(self, info, pipeline, config):
        return model.get_execution_plan(info, pipeline.to_selector(), config)
Exemple #4
0
 class Arguments:
     pipelineName = dauphin.NonNull(dauphin.String)
     config = dauphin.Argument('PipelineConfig')
     stepExecutions = dauphin.non_null_list(DauphinStepExecution)
     executionMetadata = dauphin.Argument(dauphin.NonNull(DauphinExecutionMetadata))