Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Field 'changeThreshold' doesn't exist on type 'MetricBudget' #792

Open
guilherme-monteiro-simplisafe opened this issue Mar 3, 2025 · 0 comments

Comments

@guilherme-monteiro-simplisafe

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch [email protected] for the project I'm working on.

I was following this example here: https://github.com/calibreapp/cli/blob/main/examples/nodejs/metric-budgets/list.js

But I was getting the following error:

  {
    message: "Field 'changeThreshold' doesn't exist on type 'MetricBudget'",
    locations: [ [Object] ],
    path: [
      'query ListMetricBudgets',
      'organisation',
      'site',
      'metricBudgetsList',
      'edges',
      'node',
      'changeThreshold'
    ],
    extensions: {
      code: 'undefinedField',
      typeName: 'MetricBudget',
      fieldName: 'changeThreshold'
    }
  }

Here is the diff that solved my problem:

diff --git a/node_modules/calibre/src/api/metric-budget.js b/node_modules/calibre/src/api/metric-budget.js
index 5b234b2..b55b904 100644
--- a/node_modules/calibre/src/api/metric-budget.js
+++ b/node_modules/calibre/src/api/metric-budget.js
@@ -7,7 +7,6 @@ const CREATE_MUTATION = `
       measurement
       value
       status
-      changeThreshold
 
       budgets {
         page {
@@ -40,7 +39,6 @@ const UPDATE_MUTATION = `
       measurement
       value
       status
-      changeThreshold
 
       budgets {
         page {
@@ -80,7 +78,7 @@ const LIST_QUERY = `
               measurement
               value
               status
-              changeThreshold
+      
 
               metric {
                 name

This issue body was partially generated by patch-package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant