Skip to content

[TRI-1923] React hooks should return basic metadata about the Job #884

@matt-aitken

Description

@matt-aitken

If you want to build a UI that shows runs across multiple jobs it's difficult because the hooks return no info about the job.

I suggest we return the job "id" from them (which is actually the slug in the database).

{
  job {
   //note that this is what we call the "slug" in the database
    id: "......",
  },
  //rest of the payload
}

This would creating v3 versions of the following API endpoints that return the job.id

  1. https://github.com/triggerdotdev/trigger.dev/blob/main/apps/webapp/app/routes/api.v2.runs.%24runId.ts
  2. https://github.com/triggerdotdev/trigger.dev/blob/main/apps/webapp/app/routes/api.v2.runs.%24runId.statuses.ts
  3. https://github.com/triggerdotdev/trigger.dev/blob/main/apps/webapp/app/routes/api.v2.events.%24eventId.ts

Core schema updates (add job.id)

The SDK API client URLs need updating to be v3 instead of v2

The React package URLs need updating to be v3 instead of v2:

TRI-1923

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions