From b2233106b995128343cd1088351c2a4af7470304 Mon Sep 17 00:00:00 2001 From: Fran Agulto Date: Tue, 7 Jan 2025 14:31:34 -0600 Subject: [PATCH 1/2] added basic apollo reference and explanation page --- .../apollo-client-basics/index.mdx | 20 +++++++++++++++++++ src/pages/docs/nav.json | 4 ++++ 2 files changed, 24 insertions(+) create mode 100644 src/pages/docs/explanation/apollo-client-basics/index.mdx diff --git a/src/pages/docs/explanation/apollo-client-basics/index.mdx b/src/pages/docs/explanation/apollo-client-basics/index.mdx new file mode 100644 index 00000000..97fadf92 --- /dev/null +++ b/src/pages/docs/explanation/apollo-client-basics/index.mdx @@ -0,0 +1,20 @@ +export const metadata = { + title: "Apollo Client Basics", + +} + +Faust.js uses `@apollo/client` under the hood to perform GraphQL operations against your WordPress backend. Having a solid understanding of Apollo Client queries, fragments, and mutations will help you get the most out of Faust.js. + +## Apollo Client GraphQL Concepts + +Below are core concepts for Apollo and GraphQL with links to the docs for your reference. + +- [Queries](https://www.apollographql.com/docs/react/data/queries) – Retrieve data from your WordPress site. +- [Fragments](https://www.apollographql.com/docs/react/data/fragments) – Modularize your queries to make them more maintainable. +- [Mutations](https://www.apollographql.com/docs/graphos/get-started/concepts/graphql#mutations) – Update data in your WordPress backend. +- [Apollo Client Cache](https://www.apollographql.com/docs/react/caching/cache-configuration) – Cache responses to minimize network usage. + +### Faust.js-Specific Notes + +- You don’t need to create or configure the client object yourself; Faust handles that for you. +- You can still customize the underlying Apollo Client via plugin filters if you need advanced configuration. diff --git a/src/pages/docs/nav.json b/src/pages/docs/nav.json index bcc877c9..c876ff2c 100644 --- a/src/pages/docs/nav.json +++ b/src/pages/docs/nav.json @@ -103,6 +103,10 @@ { "title": "Example", "route": "/docs/explanation/example" + }, + { + "title": "Apollo Client Basics", + "route": "/docs/explanation/apollo-client-basics/" } ] } From 974bd0aaefe22d1f21da9e66a0b925923a42b2d9 Mon Sep 17 00:00:00 2001 From: Alex Moon Date: Tue, 7 Jan 2025 16:49:37 -0800 Subject: [PATCH 2/2] fix: header indentation --- src/pages/docs/explanation/apollo-client-basics/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/docs/explanation/apollo-client-basics/index.mdx b/src/pages/docs/explanation/apollo-client-basics/index.mdx index 97fadf92..cb3c8656 100644 --- a/src/pages/docs/explanation/apollo-client-basics/index.mdx +++ b/src/pages/docs/explanation/apollo-client-basics/index.mdx @@ -14,7 +14,7 @@ Below are core concepts for Apollo and GraphQL with links to the docs for your r - [Mutations](https://www.apollographql.com/docs/graphos/get-started/concepts/graphql#mutations) – Update data in your WordPress backend. - [Apollo Client Cache](https://www.apollographql.com/docs/react/caching/cache-configuration) – Cache responses to minimize network usage. -### Faust.js-Specific Notes +## Faust.js-Specific Notes - You don’t need to create or configure the client object yourself; Faust handles that for you. - You can still customize the underlying Apollo Client via plugin filters if you need advanced configuration.