@dudousxd/nestjs-codegen 0.10.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2930,7 +2930,11 @@ function buildRequestModel(c) {
2930
2930
  urlExpr,
2931
2931
  optsExpr,
2932
2932
  responseType: `${TA}['response']`,
2933
- queryKeyExpr: `[${flat}, input] as const`
2933
+ // When no input is supplied the key omits the trailing element entirely
2934
+ // (`[name]` rather than `[name, undefined]`) so the bare `.queryKey()` is a
2935
+ // clean prefix that partial-matches every parametrized variant — making it
2936
+ // directly usable for `invalidateQueries`.
2937
+ queryKeyExpr: `(input === undefined ? [${flat}] as const : [${flat}, input] as const)`
2934
2938
  };
2935
2939
  }
2936
2940
  function renderFetcherRequest(req) {