Skip to content

Getting Change Events don't return the field changed_fields anymore since version 20.0.0 #519

@denizelderenbos

Description

@denizelderenbos

change_event.changed_fields becomes undefined after upgrading google-ads-api past v19.0.2

Description

When querying the Google Ads API for change_event records, prior to v19.0.2 the changed_fields field was returned as an object with a paths array:

{
  // … other fields …
  "changed_fields": {
    "paths": [
      "amount_micros"
    ]
  }
}

But as soon as we upgrade to v20.0.0 (and later), the same query returns:

{
  // … other fields …
  "changed_fields": undefined
}

This appears to be a breaking change in the wrapper’s parsing logic, since the raw REST response still includes the changed_fields payload when inspected via curl or a proxy.

Steps to Reproduce

  1. Pin your project to google-ads-api@20.0.0 and execute:

    const result = await customer.query(`
      SELECT
        change_event.change_date_time,
        change_event.change_resource_name,
        change_event.changed_fields
      FROM change_event
      WHERE change_event.change_date_time DURING TODAY
      LIMIT 1
    `)
    console.log(result[0].changed_fields)
    // → { paths: ["..."] }
    
  2. Upgrade to google-ads-api@20.0.0:

    npm install google-ads-api@20.0.0
    

    Run the same code:

    console.log(result[0].changed_fields)
    // → undefined
    
  3. Confirm via direct REST call that the payload still contains changedFields:

    curl -H "Authorization: Bearer <token>" \
         -H "login-customer-id: <loginCustomerId>" \
         -H "developer-token: <token>" \
         -d '{ "query":"SELECT change_event.changed_fields FROM change_event WHERE change_event.change_date_time DURING LAST_7_DAYS" }' \
         https://googleads.googleapis.com/v20/customers/<cid>/googleAds:search
    

    The JSON response will include "changedFields": { "paths": […] }.

Expected Behavior

The changed_fields property on each returned row should be a parsed object (e.g. { paths: string[] }), matching the behavior in v19.0.2.

Actual Behavior

In v20.0.0 and later, the changed_fields property is always undefined, despite the REST payload containing it.

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