Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connect CMS (WordPress) API to Apollo client #32

Closed
8 tasks done
anuveyatsu opened this issue Jun 26, 2020 · 2 comments
Closed
8 tasks done

Connect CMS (WordPress) API to Apollo client #32

anuveyatsu opened this issue Jun 26, 2020 · 2 comments
Assignees
Projects

Comments

@anuveyatsu
Copy link
Member

anuveyatsu commented Jun 26, 2020

As next step after #29 we want to connect second data source which is WordPress REST API to our Apollo GraphQL client.

Acceptance criteria

  • I can connect a WordPress.com instance by defining CMS env var.
  • All my posts appear at /blog/
  • All my pages appear at /:slug
    • appars at /p/:slug

Tasks

  • Create components for rendering static content: /components/static/Page.tsx and /components/static/Post.tsx
  • Create NextJS page for both page and post types: /pages/[page]/index.tsx and /pages/blog/[post]/index.tsx
  • Setup Apollo client to connect multiple REST APIs: https://www.apollographql.com/docs/link/links/rest/#multiple-endpoints
  • Setup NextJS pages to fetch WordPress API
  • Setup components to use the content from Apollo cache
@anuveyatsu anuveyatsu added this to the Sprint - 26 Jun 2020 milestone Jun 26, 2020
@anuveyatsu anuveyatsu self-assigned this Jun 26, 2020
@anuveyatsu anuveyatsu added this to Prioritized in v1 Overview via automation Jun 26, 2020
@anuveyatsu
Copy link
Member Author

anuveyatsu commented Jun 26, 2020

@rufuspollock this is now deployed at https://portal.datopian1.now.sh/blog

Points to note:

  • We need to think about DEMO wordpress site. I hope it's ok to use oddk WP for the demo here.
  • For the static pages (not posts, eg, about page) from WordPress, we can't have path like /:slug because we also have /search and /@org. Here I've implemented it as /p/:slug but if you have a suggestion please let me know, eg, /page/:slug etc.

@anuveyatsu
Copy link
Member Author

Closing as FIXED, see the last comment above.

v1 Overview automation moved this from In progress to Done Jul 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
v1 Overview
  
Done
Development

No branches or pull requests

1 participant