Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
1 line
1.2 KiB
Plaintext
1 line
1.2 KiB
Plaintext
{"version":3,"sources":["../../../../../src/packages/graphql-query-complexity/estimators/fieldExtensions/index.ts"],"sourcesContent":["import type { ComplexityEstimator, ComplexityEstimatorArgs } from '../../QueryComplexity.js'\n\nexport const fieldExtensionsEstimator = (): ComplexityEstimator => {\n return (args: ComplexityEstimatorArgs): number | void => {\n if (args.field.extensions) {\n // Calculate complexity score\n if (typeof args.field.extensions.complexity === 'number') {\n return args.childComplexity + args.field.extensions.complexity\n } else if (typeof args.field.extensions.complexity === 'function') {\n return args.field.extensions.complexity(args)\n }\n }\n }\n}\n"],"names":["fieldExtensionsEstimator","args","field","extensions","complexity","childComplexity"],"mappings":"AAEA,OAAO,MAAMA,2BAA2B;IACtC,OAAO,CAACC;QACN,IAAIA,KAAKC,KAAK,CAACC,UAAU,EAAE;YACzB,6BAA6B;YAC7B,IAAI,OAAOF,KAAKC,KAAK,CAACC,UAAU,CAACC,UAAU,KAAK,UAAU;gBACxD,OAAOH,KAAKI,eAAe,GAAGJ,KAAKC,KAAK,CAACC,UAAU,CAACC,UAAU;YAChE,OAAO,IAAI,OAAOH,KAAKC,KAAK,CAACC,UAAU,CAACC,UAAU,KAAK,YAAY;gBACjE,OAAOH,KAAKC,KAAK,CAACC,UAAU,CAACC,UAAU,CAACH;YAC1C;QACF;IACF;AACF,EAAC"} |