Skip to content

Conversation

@Fran-A-Dev
Copy link
Contributor

@Fran-A-Dev Fran-A-Dev commented Jan 2, 2025

Added the how to docs for working with the Apollo Client in Faust.js


@headless-platform-by-wp-engine

Check out the recent updates to your Headless Platform preview environment:

App Environment URL Build
faustjs.org preview-env-docs/work-with-apollo https://hs…wered.com ✅ (logs)

Learn more about preview environments in our documentation.

@moonmeister moonmeister marked this pull request as draft January 3, 2025 00:14
Copy link
Member

@moonmeister moonmeister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This article needs a big re-write. It's not a how-to doc. There is reference material, some explanation, and no clear goal.

Break this article into several new docs:

  1. (how-to) "Using WPGraphQL Smart Cache" or "Network Caching" - This is very rambly currently, this needs to be clear step-by-step instructions.
    • Making One-Off POST/GET Requests - this is great content for an aside in the how-to to let people know how to override this new default
    • make sure this includes all the steps to enable Persisted queries and use GET requests
  2. (explanation) Apollo Client Basics (just link out to various places as is done already)
  3. (how-to) "Query data in the browser"
    The content would be Using the client in components and pages make sure to communicate this is not server-rendered content
  4. (how-to) "Query Data in Next.js Routes" - this is similar to 3 except it walks the user through adding getNextServerSideProps or getNextStaticProps to do SSR rendered content but not in components...this would only be in pages.
  5. https://hst0drz8fl1k33sd46hrnns7m.js.wpenginepowered.com/docs/how-to/work-with-apollo/#

Content to be dropped?

  1. Generating Possible types JSON - I think this can be dropped as it's in the "Basic Setup" I don't see any value to this being a stand-alone doc

@Fran-A-Dev
Copy link
Contributor Author

This article needs a big re-write. It's not a how-to doc. There is reference material, some explanation, and no clear goal.

Break this article into several new docs:

  1. (how-to) "Using WPGraphQL Smart Cache" or "Network Caching" - This is very rambly currently, this needs to be clear step-by-step instructions.

    • Making One-Off POST/GET Requests - this is great content for an aside in the how-to to let people know how to override this new default
    • make sure this includes all the steps to enable Persisted queries and use GET requests
  2. (explanation) Apollo Client Basics (just link out to various places as is done already)

  3. (how-to) "Query data in the browser"
    The content would be Using the client in components and pages make sure to communicate this is not server-rendered content

  4. (how-to) "Query Data in Next.js Routes" - this is similar to 3 except it walks the user through adding getNextServerSideProps or getNextStaticProps to do SSR rendered content but not in components...this would only be in pages.

  5. https://hst0drz8fl1k33sd46hrnns7m.js.wpenginepowered.com/docs/how-to/work-with-apollo/#

Content to be dropped?

  1. Generating Possible types JSON - I think this can be dropped as it's in the "Basic Setup" I don't see any value to this being a stand-alone doc

@moonmeister Ya, I share the same sentiments. As I was porting this doc over from the current Faust doc site, it is under "how-to" but I was wondering if you might think this needs to be broken up into different parts that make more sense. I just was not sure when the original authors of this doc wrote it, what the purpose was as far as putting it under the "how-to" category. Good idea to break this up. I'll work on your suggestions. @kellenmace let me know your thoughts as well on this one.

@moonmeister
Copy link
Member

@Fran-A-Dev yeah it's definitely a confusing one. Take my specific recommendations as just that, and if I missed anything feel free to do as you see fit.

@Fran-A-Dev
Copy link
Contributor Author

@Fran-A-Dev yeah it's definitely a confusing one. Take my specific recommendations as just that, and if I missed anything feel free to do as you see fit.

@moonmeister I took a look at the way you broke out the sections of this doc into smaller sections. To me, this all makes sense. I did not feel there was anything missing to it. As I am making each separate doc, if I do find something is missing I will add it.

@kellenmace do you have any thoughts or additions to this broken up doc?

@Fran-A-Dev Fran-A-Dev closed this Jan 9, 2025
@moonmeister moonmeister deleted the docs/work-with-apollo branch January 15, 2025 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants