From 0adad9209265c388eb6d334afe681610bccfb877 Mon Sep 17 00:00:00 2001 From: Nathaniel Tucker Date: Mon, 22 Jul 2024 11:47:04 +0200 Subject: [PATCH] docs: guides/debugging -> getting-started/debugging --- .changeset/real-ties-trade.md | 8 ++++++++ .github/ISSUE_TEMPLATE/bug_report.md | 2 +- CONTRIBUTING.md | 2 +- README.md | 2 +- docs/core/README.md | 2 +- docs/core/api/DevToolsManager.md | 2 +- docs/core/concepts/managers.md | 4 ++-- docs/core/concepts/normalization.md | 4 ++-- docs/core/{guides => getting-started}/debugging.md | 0 packages/endpoint/src/schemas/Entity.ts | 2 +- packages/endpoint/src/schemas/EntitySchema.ts | 2 +- packages/endpoint/src/schemas/Invalidate.ts | 2 +- .../__tests__/__snapshots__/Entity.test.ts.snap | 10 +++++----- .../__tests__/__snapshots__/EntitySchema.test.ts.snap | 8 ++++---- .../__tests__/__snapshots__/Invalidate.test.ts.snap | 4 ++-- packages/react/README.md | 2 +- .../__snapshots__/integration-endpoint.web.tsx.snap | 4 ++-- packages/react/src/components/DevToolsButton.tsx | 5 ++++- .../__snapshots__/useSuspense.native.tsx.snap | 8 ++++---- .../__tests__/__snapshots__/useSuspense.web.tsx.snap | 8 ++++---- website/docusaurus.config.ts | 4 ++++ website/sidebars.json | 2 +- 22 files changed, 51 insertions(+), 36 deletions(-) create mode 100644 .changeset/real-ties-trade.md rename docs/core/{guides => getting-started}/debugging.md (100%) diff --git a/.changeset/real-ties-trade.md b/.changeset/real-ties-trade.md new file mode 100644 index 000000000000..56ae8e483dbf --- /dev/null +++ b/.changeset/real-ties-trade.md @@ -0,0 +1,8 @@ +--- +'@data-client/endpoint': patch +'@data-client/react': patch +'@data-client/graphql': patch +'@data-client/rest': patch +--- + +Update debugging link diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 6faa2e319f7b..76071f9a30b4 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -34,7 +34,7 @@ A clear and concise description of what you expected to happen. Include anything that could be related: - Console errors and warnings - [Network inspector](https://developer.chrome.com/docs/devtools/network/) screenshots -- [Browser Devtools](https://dataclient.io/docs/guides/debugging) screenshots or state and action dumps +- [Browser Devtools](https://dataclient.io/docs/getting-started/debugging) screenshots or state and action dumps **Minimum reproducable example or test case** For many cases reproducing the bug is fairly straightforward. However, if diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6ee70c56c2da..17a69d433ea6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,7 +8,7 @@ why you expected it. * Include any relevant stack traces or debugging output. * Ensure you captured relevant [network inspector](https://developer.chrome.com/docs/devtools/network/) screenshots -* Ensure [Browser Devtools](https://dataclient.io/docs/guides/debugging) screenshots or state and action dumps +* Ensure [Browser Devtools](https://dataclient.io/docs/getting-started/debugging) screenshots or state and action dumps ## Feature Requests diff --git a/README.md b/README.md index bc81a3f9e208..da49417d8b9a 100644 --- a/README.md +++ b/README.md @@ -229,7 +229,7 @@ For the small price of 9kb gziped.    [๐ŸGet started now](https://da - [x] ๐Ÿ›‘ Automatic overfetching elimination - [x] โœจ Fast [optimistic updates](https://dataclient.io/rest/guides/optimistic-updates) - [x] ๐Ÿง˜ [Flexible](https://dataclient.io/docs/getting-started/resource) to fit any API design (one size fits all) -- [x] ๐Ÿ”ง [Debugging and inspection](https://dataclient.io/docs/guides/debugging) via browser extension +- [x] ๐Ÿ”ง [Debugging and inspection](https://dataclient.io/docs/getting-started/debugging) via browser extension - [x] ๐ŸŒณ Tree-shakable (only use what you need) - [x] ๐Ÿ” [Subscriptions](https://dataclient.io/docs/api/useSubscription) - [x] โ™ป๏ธ Optional [redux integration](https://dataclient.io/docs/guides/redux) diff --git a/docs/core/README.md b/docs/core/README.md index d824187643c0..438c94d9b5f9 100644 --- a/docs/core/README.md +++ b/docs/core/README.md @@ -502,7 +502,7 @@ Add the Redux DevTools for or [firefox extension](https://addons.mozilla.org/en-US/firefox/addon/reduxdevtools/) -Click the icon to open the [inspector](./guides/debugging.md), which allows you to observe dispatched actions, +Click the icon to open the [inspector](./getting-started/debugging.md), which allows you to observe dispatched actions, their effect on the cache state as well as current cache state. ## Mock data diff --git a/docs/core/api/DevToolsManager.md b/docs/core/api/DevToolsManager.md index 787ce573893b..29e597021686 100644 --- a/docs/core/api/DevToolsManager.md +++ b/docs/core/api/DevToolsManager.md @@ -95,4 +95,4 @@ ReactDOM.createRoot(document.body).render( ## More info -Using this Manager allows in browser [debugging and store inspection](../guides/debugging). +Using this Manager allows in browser [debugging and store inspection](../getting-started/debugging.md). diff --git a/docs/core/concepts/managers.md b/docs/core/concepts/managers.md index cb1d5e0230b6..6b617bab8c67 100644 --- a/docs/core/concepts/managers.md +++ b/docs/core/concepts/managers.md @@ -16,7 +16,7 @@ import StackBlitz from '@site/src/components/StackBlitz'; # Managers and Middleware Reactive Data Client uses the [flux store](https://facebookarchive.github.io/flux/docs/in-depth-overview/) pattern, which is -characterized by an easy to [understand and debug](../guides/debugging.md) the store's [undirectional data flow](). State updates are performed by a [reducer function](https://github.com/reactive/data-client/blob/master/packages/core/src/state/reducer/createReducer.ts#L19). +characterized by an easy to [understand and debug](../getting-started/debugging.md) the store's [undirectional data flow](). State updates are performed by a [reducer function](https://github.com/reactive/data-client/blob/master/packages/core/src/state/reducer/createReducer.ts#L19). -Data Client Debugging Guide ยป +Data Client Debugging Guide ยป diff --git a/docs/core/guides/debugging.md b/docs/core/getting-started/debugging.md similarity index 100% rename from docs/core/guides/debugging.md rename to docs/core/getting-started/debugging.md diff --git a/packages/endpoint/src/schemas/Entity.ts b/packages/endpoint/src/schemas/Entity.ts index 76a31b4b48a9..557520919440 100644 --- a/packages/endpoint/src/schemas/Entity.ts +++ b/packages/endpoint/src/schemas/Entity.ts @@ -89,7 +89,7 @@ export default abstract class Entity extends EntitySchema(EmptyBase) { This is likely due to a malformed response. Try inspecting the network response or fetch() return value. -Or use debugging tools: https://dataclient.io/docs/guides/debugging +Or use debugging tools: https://dataclient.io/docs/getting-started/debugging Learn more about schemas: https://dataclient.io/docs/api/schema If this is a mistake, you can disable this check by setting static automaticValidation = 'silent' diff --git a/packages/endpoint/src/schemas/EntitySchema.ts b/packages/endpoint/src/schemas/EntitySchema.ts index d56bf0e8c1f9..159f582bfd86 100644 --- a/packages/endpoint/src/schemas/EntitySchema.ts +++ b/packages/endpoint/src/schemas/EntitySchema.ts @@ -240,7 +240,7 @@ export default function EntitySchema( This is likely due to a malformed response. Try inspecting the network response or fetch() return value. - Or use debugging tools: https://dataclient.io/docs/guides/debugging + Or use debugging tools: https://dataclient.io/docs/getting-started/debugging Learn more about primary keys: https://dataclient.io/rest/api/Entity#pk Entity: ${this.key} diff --git a/packages/endpoint/src/schemas/Invalidate.ts b/packages/endpoint/src/schemas/Invalidate.ts index 6ea4270f59e3..9f292780969d 100644 --- a/packages/endpoint/src/schemas/Invalidate.ts +++ b/packages/endpoint/src/schemas/Invalidate.ts @@ -60,7 +60,7 @@ export default class Invalidate< This is likely due to a malformed response. Try inspecting the network response or fetch() return value. - Or use debugging tools: https://dataclient.io/docs/guides/debugging + Or use debugging tools: https://dataclient.io/docs/getting-started/debugging Learn more about schemas: https://dataclient.io/docs/api/schema Invalidate(Entity): Invalidate(${this._entity.key}) diff --git a/packages/endpoint/src/schemas/__tests__/__snapshots__/Entity.test.ts.snap b/packages/endpoint/src/schemas/__tests__/__snapshots__/Entity.test.ts.snap index cb6d093be187..a20a36e28867 100644 --- a/packages/endpoint/src/schemas/__tests__/__snapshots__/Entity.test.ts.snap +++ b/packages/endpoint/src/schemas/__tests__/__snapshots__/Entity.test.ts.snap @@ -506,7 +506,7 @@ exports[`Entity normalization should throw a custom error if data does not inclu This is likely due to a malformed response. Try inspecting the network response or fetch() return value. - Or use debugging tools: https://dataclient.io/docs/guides/debugging + Or use debugging tools: https://dataclient.io/docs/getting-started/debugging Learn more about primary keys: https://dataclient.io/rest/api/Entity#pk Entity: MyEntity @@ -521,7 +521,7 @@ exports[`Entity normalization should throw a custom error if data does not inclu This is likely due to a malformed response. Try inspecting the network response or fetch() return value. - Or use debugging tools: https://dataclient.io/docs/guides/debugging + Or use debugging tools: https://dataclient.io/docs/getting-started/debugging Learn more about primary keys: https://dataclient.io/rest/api/Entity#pk Entity: MyEntity @@ -536,7 +536,7 @@ exports[`Entity normalization should throw a custom error if data loads with no This is likely due to a malformed response. Try inspecting the network response or fetch() return value. - Or use debugging tools: https://dataclient.io/docs/guides/debugging + Or use debugging tools: https://dataclient.io/docs/getting-started/debugging Learn more about primary keys: https://dataclient.io/rest/api/Entity#pk Entity: MyEntity @@ -561,7 +561,7 @@ exports[`Entity normalization should throw a custom error loads with array 1`] = This is likely due to a malformed response. Try inspecting the network response or fetch() return value. -Or use debugging tools: https://dataclient.io/docs/guides/debugging +Or use debugging tools: https://dataclient.io/docs/getting-started/debugging Learn more about schemas: https://dataclient.io/docs/api/schema If this is a mistake, you can disable this check by setting static automaticValidation = 'silent' @@ -588,7 +588,7 @@ exports[`Entity normalization should warn when automaticValidation === "warn" 1` This is likely due to a malformed response. Try inspecting the network response or fetch() return value. -Or use debugging tools: https://dataclient.io/docs/guides/debugging +Or use debugging tools: https://dataclient.io/docs/getting-started/debugging Learn more about schemas: https://dataclient.io/docs/api/schema If this is a mistake, you can disable this check by setting static automaticValidation = 'silent' diff --git a/packages/endpoint/src/schemas/__tests__/__snapshots__/EntitySchema.test.ts.snap b/packages/endpoint/src/schemas/__tests__/__snapshots__/EntitySchema.test.ts.snap index 02de39816020..70a8c9c08930 100644 --- a/packages/endpoint/src/schemas/__tests__/__snapshots__/EntitySchema.test.ts.snap +++ b/packages/endpoint/src/schemas/__tests__/__snapshots__/EntitySchema.test.ts.snap @@ -494,7 +494,7 @@ exports[`EntitySchema normalization should error if no matching keys are found 1 This is likely due to a malformed response. Try inspecting the network response or fetch() return value. - Or use debugging tools: https://dataclient.io/docs/guides/debugging + Or use debugging tools: https://dataclient.io/docs/getting-started/debugging Learn more about primary keys: https://dataclient.io/rest/api/Entity#pk Entity: MyEntity @@ -533,7 +533,7 @@ exports[`EntitySchema normalization should throw a custom error if data does not This is likely due to a malformed response. Try inspecting the network response or fetch() return value. - Or use debugging tools: https://dataclient.io/docs/guides/debugging + Or use debugging tools: https://dataclient.io/docs/getting-started/debugging Learn more about primary keys: https://dataclient.io/rest/api/Entity#pk Entity: MyData @@ -548,7 +548,7 @@ exports[`EntitySchema normalization should throw a custom error if data loads wi This is likely due to a malformed response. Try inspecting the network response or fetch() return value. - Or use debugging tools: https://dataclient.io/docs/guides/debugging + Or use debugging tools: https://dataclient.io/docs/getting-started/debugging Learn more about primary keys: https://dataclient.io/rest/api/Entity#pk Entity: MyData @@ -573,7 +573,7 @@ exports[`EntitySchema normalization should throw a custom error loads with array This is likely due to a malformed response. Try inspecting the network response or fetch() return value. - Or use debugging tools: https://dataclient.io/docs/guides/debugging + Or use debugging tools: https://dataclient.io/docs/getting-started/debugging Learn more about primary keys: https://dataclient.io/rest/api/Entity#pk Entity: MyData diff --git a/packages/endpoint/src/schemas/__tests__/__snapshots__/Invalidate.test.ts.snap b/packages/endpoint/src/schemas/__tests__/__snapshots__/Invalidate.test.ts.snap index dd57c42b4a37..d3cf7aa30f14 100644 --- a/packages/endpoint/src/schemas/__tests__/__snapshots__/Invalidate.test.ts.snap +++ b/packages/endpoint/src/schemas/__tests__/__snapshots__/Invalidate.test.ts.snap @@ -151,7 +151,7 @@ exports[`Invalidate normalization should throw a custom error if data does not i This is likely due to a malformed response. Try inspecting the network response or fetch() return value. - Or use debugging tools: https://dataclient.io/docs/guides/debugging + Or use debugging tools: https://dataclient.io/docs/getting-started/debugging Learn more about schemas: https://dataclient.io/docs/api/schema Invalidate(Entity): Invalidate(MyEntity) @@ -166,7 +166,7 @@ exports[`Invalidate normalization should throw a custom error if data does not i This is likely due to a malformed response. Try inspecting the network response or fetch() return value. - Or use debugging tools: https://dataclient.io/docs/guides/debugging + Or use debugging tools: https://dataclient.io/docs/getting-started/debugging Learn more about schemas: https://dataclient.io/docs/api/schema Invalidate(Entity): Invalidate(MyEntity) diff --git a/packages/react/README.md b/packages/react/README.md index 3e4d0812d26a..e4b6a235a8ad 100644 --- a/packages/react/README.md +++ b/packages/react/README.md @@ -226,7 +226,7 @@ For the small price of 9kb gziped.    [๐ŸGet started now](https://da - [x] ๐Ÿ›‘ Automatic overfetching elimination - [x] โœจ Fast [optimistic updates](https://dataclient.io/rest/guides/optimistic-updates) - [x] ๐Ÿง˜ [Flexible](https://dataclient.io/docs/getting-started/resource) to fit any API design (one size fits all) -- [x] ๐Ÿ”ง [Debugging and inspection](https://dataclient.io/docs/guides/debugging) via browser extension +- [x] ๐Ÿ”ง [Debugging and inspection](https://dataclient.io/docs/getting-started/debugging) via browser extension - [x] ๐ŸŒณ Tree-shakable (only use what you need) - [x] ๐Ÿ” [Subscriptions](https://dataclient.io/docs/api/useSubscription) - [x] โ™ป๏ธ Optional [redux integration](https://dataclient.io/docs/guides/redux) diff --git a/packages/react/src/__tests__/__snapshots__/integration-endpoint.web.tsx.snap b/packages/react/src/__tests__/__snapshots__/integration-endpoint.web.tsx.snap index db1f7bac27f3..2369ae3cfda0 100644 --- a/packages/react/src/__tests__/__snapshots__/integration-endpoint.web.tsx.snap +++ b/packages/react/src/__tests__/__snapshots__/integration-endpoint.web.tsx.snap @@ -210,7 +210,7 @@ Attempted to initialize CoolerArticle with an array, but named members were expe This is likely due to a malformed response. Try inspecting the network response or fetch() return value. -Or use debugging tools: https://dataclient.io/docs/guides/debugging +Or use debugging tools: https://dataclient.io/docs/getting-started/debugging Learn more about schemas: https://dataclient.io/docs/api/schema If this is a mistake, you can disable this check by setting static automaticValidation = 'silent' @@ -429,7 +429,7 @@ Attempted to initialize CoolerArticle with an array, but named members were expe This is likely due to a malformed response. Try inspecting the network response or fetch() return value. -Or use debugging tools: https://dataclient.io/docs/guides/debugging +Or use debugging tools: https://dataclient.io/docs/getting-started/debugging Learn more about schemas: https://dataclient.io/docs/api/schema If this is a mistake, you can disable this check by setting static automaticValidation = 'silent' diff --git a/packages/react/src/components/DevToolsButton.tsx b/packages/react/src/components/DevToolsButton.tsx index 9d50510f279b..7c5dc12950c3 100644 --- a/packages/react/src/components/DevToolsButton.tsx +++ b/packages/react/src/components/DevToolsButton.tsx @@ -33,7 +33,10 @@ export default function DevToolsButton({
DevTools{' '} - + โ„น๏ธ
diff --git a/packages/react/src/hooks/__tests__/__snapshots__/useSuspense.native.tsx.snap b/packages/react/src/hooks/__tests__/__snapshots__/useSuspense.native.tsx.snap index 95afaa58ca63..b0b32ac7a612 100644 --- a/packages/react/src/hooks/__tests__/__snapshots__/useSuspense.native.tsx.snap +++ b/packages/react/src/hooks/__tests__/__snapshots__/useSuspense.native.tsx.snap @@ -18,7 +18,7 @@ Attempted to initialize CoolerArticle with an array, but named members were expe This is likely due to a malformed response. Try inspecting the network response or fetch() return value. -Or use debugging tools: https://dataclient.io/docs/guides/debugging +Or use debugging tools: https://dataclient.io/docs/getting-started/debugging Learn more about schemas: https://dataclient.io/docs/api/schema If this is a mistake, you can disable this check by setting static automaticValidation = 'silent' @@ -43,7 +43,7 @@ Attempted to initialize CoolerArticle with an array, but named members were expe This is likely due to a malformed response. Try inspecting the network response or fetch() return value. -Or use debugging tools: https://dataclient.io/docs/guides/debugging +Or use debugging tools: https://dataclient.io/docs/getting-started/debugging Learn more about schemas: https://dataclient.io/docs/api/schema If this is a mistake, you can disable this check by setting static automaticValidation = 'silent' @@ -68,7 +68,7 @@ Attempted to initialize CoolerArticle with an array, but named members were expe This is likely due to a malformed response. Try inspecting the network response or fetch() return value. -Or use debugging tools: https://dataclient.io/docs/guides/debugging +Or use debugging tools: https://dataclient.io/docs/getting-started/debugging Learn more about schemas: https://dataclient.io/docs/api/schema If this is a mistake, you can disable this check by setting static automaticValidation = 'silent' @@ -93,7 +93,7 @@ Attempted to initialize CoolerArticle with an array, but named members were expe This is likely due to a malformed response. Try inspecting the network response or fetch() return value. -Or use debugging tools: https://dataclient.io/docs/guides/debugging +Or use debugging tools: https://dataclient.io/docs/getting-started/debugging Learn more about schemas: https://dataclient.io/docs/api/schema If this is a mistake, you can disable this check by setting static automaticValidation = 'silent' diff --git a/packages/react/src/hooks/__tests__/__snapshots__/useSuspense.web.tsx.snap b/packages/react/src/hooks/__tests__/__snapshots__/useSuspense.web.tsx.snap index 95afaa58ca63..b0b32ac7a612 100644 --- a/packages/react/src/hooks/__tests__/__snapshots__/useSuspense.web.tsx.snap +++ b/packages/react/src/hooks/__tests__/__snapshots__/useSuspense.web.tsx.snap @@ -18,7 +18,7 @@ Attempted to initialize CoolerArticle with an array, but named members were expe This is likely due to a malformed response. Try inspecting the network response or fetch() return value. -Or use debugging tools: https://dataclient.io/docs/guides/debugging +Or use debugging tools: https://dataclient.io/docs/getting-started/debugging Learn more about schemas: https://dataclient.io/docs/api/schema If this is a mistake, you can disable this check by setting static automaticValidation = 'silent' @@ -43,7 +43,7 @@ Attempted to initialize CoolerArticle with an array, but named members were expe This is likely due to a malformed response. Try inspecting the network response or fetch() return value. -Or use debugging tools: https://dataclient.io/docs/guides/debugging +Or use debugging tools: https://dataclient.io/docs/getting-started/debugging Learn more about schemas: https://dataclient.io/docs/api/schema If this is a mistake, you can disable this check by setting static automaticValidation = 'silent' @@ -68,7 +68,7 @@ Attempted to initialize CoolerArticle with an array, but named members were expe This is likely due to a malformed response. Try inspecting the network response or fetch() return value. -Or use debugging tools: https://dataclient.io/docs/guides/debugging +Or use debugging tools: https://dataclient.io/docs/getting-started/debugging Learn more about schemas: https://dataclient.io/docs/api/schema If this is a mistake, you can disable this check by setting static automaticValidation = 'silent' @@ -93,7 +93,7 @@ Attempted to initialize CoolerArticle with an array, but named members were expe This is likely due to a malformed response. Try inspecting the network response or fetch() return value. -Or use debugging tools: https://dataclient.io/docs/guides/debugging +Or use debugging tools: https://dataclient.io/docs/getting-started/debugging Learn more about schemas: https://dataclient.io/docs/api/schema If this is a mistake, you can disable this check by setting static automaticValidation = 'silent' diff --git a/website/docusaurus.config.ts b/website/docusaurus.config.ts index 64198870ff65..0e5ae7d27e7f 100644 --- a/website/docusaurus.config.ts +++ b/website/docusaurus.config.ts @@ -342,6 +342,10 @@ const config: Config = { to: '/docs/api/ExternalDataProvider', from: ['/docs/api/ExternalCacheProvider'], }, + { + to: '/docs/getting-started/debugging', + from: ['/docs/guides/debugging'], + }, ...gqlRedirects, ], }, diff --git a/website/sidebars.json b/website/sidebars.json index 73ebf9756d83..94778dc0e394 100644 --- a/website/sidebars.json +++ b/website/sidebars.json @@ -27,7 +27,7 @@ }, { "type": "doc", - "id": "guides/debugging" + "id": "getting-started/debugging" } ] },