DeprecatrAI

Migrate from 2024-Q4 to 2025-Q1

Update your query to use the new `workflowRunState` enum instead of `status` for workflow run filtering.

within 90 days~2h effort1 breaking changes

What Changed

High

Workflow Run Status Field Deprecated

The `status` field for filtering workflow runs has been deprecated and replaced by the more granular `workflowRunState` enum. This change affects how you query for the state of workflow runs.

Before
query { repository(name: "my-repo", owner: "my-org") { workflows(first: 1) { nodes { workflowRuns(first: 10, status: COMPLETED) { ... } } } } }
After
query { repository(name: "my-repo", owner: "my-org") { workflows(first: 1) { nodes { workflowRuns(first: 10, workflowRunState: COMPLETED) { ... } } } } }

Migration Steps

  1. 1

    Identify and Update Deprecated Fields

    code

    Review your existing GraphQL queries that interact with workflow runs. Specifically, look for any usage of the `status` field within `workflowRuns`. Replace it with the new `workflowRunState` enum.

    • Use your code search tools to find all instances of `status` within `workflowRuns` arguments.
    • Consult the official GitHub GraphQL API changelog for a full list of available `workflowRunState` values.
    • Ensure your new queries handle potential null values for `workflowRunState` if applicable.
  2. 2

    Update API Client/SDK

    code

    If you are using a GraphQL client library or SDK, ensure it is updated to the latest compatible version for the 2025-Q1 API. Older client versions might not correctly parse the updated schema.

    • Check your dependency manager (e.g., npm, pip, yarn) for available updates.
    • Read the changelog for your specific GraphQL client for any migration notes.
  3. 3

    Test Locally with Staging/Dev Environment

    test

    Before deploying to production, thoroughly test your updated queries in a staging or development environment that mirrors your production setup. Verify that all workflow run data is fetched correctly and that no unexpected errors occur.

    • Run your application's full test suite.
    • Manually execute key queries that were affected by the change.
  4. 4

    Rollout to Production

    deploy

    Implement a phased rollout strategy for your application updates. Monitor your application's performance and error logs closely during and after the deployment to catch any unforeseen issues.

    • Consider a canary deployment or feature flag approach.
    • Have a rollback plan in place.
  5. 5

    Monitor Post-Deployment

    verify

    After the migration is complete and rolled out, continue to monitor your application's API interactions. Pay attention to error rates, performance metrics, and user feedback related to workflow run data.

    • Set up alerts for API-related errors.
    • Review application logs for any GraphQL-specific warnings or errors.

Testing Checklist

  1. 1.

    Verify workflow run queries with `workflowRunState`

    Execute queries using the new `workflowRunState` enum and confirm correct data retrieval.

  2. 2.

    Check for `status` field usage in logs

    Monitor application logs for any residual attempts to use the deprecated `status` field.

  3. 3.

    Validate filtering and sorting of workflow runs

    Test different `workflowRunState` values and sorting options to ensure accuracy.

  4. 4.

    Confirm API error rates remain low

    Monitor your application's API error dashboard post-deployment.

Common Mistakes

Forgetting to update all occurrences of the `status` field.

Queries using the old field will fail or return incomplete data.

Perform a thorough code search across the entire codebase and all connected services for `status` within `workflowRuns`.

Not updating the GraphQL client/SDK.

The client might not understand the new schema or reject requests, leading to unexpected errors.

Always update your GraphQL client libraries to the latest stable version after an API schema change.

Insufficient testing in a staging environment.

Breaking changes may only be discovered in production, causing downtime.

Dedicate time for comprehensive testing on a staging environment that closely mimics production.

Never get blindsided by an API change again

Deprecatr AI monitors 150+ providers, maps changes to your codebase, and delivers migration checklists before your team hits a breaking change.

Join the Waitlist