Skip to content

Commit

Permalink
Runtime deprecation warning in attachOperation
Browse files Browse the repository at this point in the history
  • Loading branch information
igorkamyshev committed Apr 16, 2024
1 parent 323cb83 commit 434982a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/pretty-mails-switch.md
@@ -0,0 +1,5 @@
---
"@farfetched/core": minor
---

Runtime deprecation warning in `attachOperation`
4 changes: 4 additions & 0 deletions packages/core/src/attach/attach.ts
Expand Up @@ -106,6 +106,10 @@ export function attachOperation<
mapParams?: (params: NewParams, source?: any) => OriginalParams;
}
) {
console.error(
'attachOperation is deprecated since 0.12, please read the migration guide: https://farfetched.pages.dev/adr/attach_operation_deprecation.html'
);

const { source, mapParams } = config ?? {};

return operation.__.experimentalAPI?.attach({
Expand Down

0 comments on commit 434982a

Please sign in to comment.