├── .gitignore
├── README.md
├── express
├── README.md
├── app.js
├── babel.config.js
├── docs
│ └── img
│ │ ├── express-app.png
│ │ └── usage-screenshot.png
├── package-lock.json
├── package.json
├── templates
│ └── index.js
└── yarn.lock
├── faust
├── .env.local.sample
├── .eslintrc
├── .gitignore
├── README.md
├── gqty.config.js
├── next-env.d.ts
├── next.config.js
├── package-lock.json
├── package.json
├── public
│ ├── favicon.ico
│ └── images
│ │ └── headless_hero_background.jpg
├── src
│ ├── client
│ │ ├── index.ts
│ │ └── schema.generated.ts
│ ├── components
│ │ ├── CTA.tsx
│ │ ├── Footer.tsx
│ │ ├── Header.tsx
│ │ ├── Heading.tsx
│ │ ├── Hero.tsx
│ │ ├── Pagination.tsx
│ │ ├── Posts.tsx
│ │ └── index.ts
│ ├── faust.config.js
│ ├── lib
│ │ └── utils
│ │ │ └── flatListToHierarchical.js
│ ├── pages
│ │ ├── 404.tsx
│ │ ├── [...pageUri].tsx
│ │ ├── _app.tsx
│ │ ├── _document.tsx
│ │ ├── api
│ │ │ └── faust
│ │ │ │ └── [[...route]].ts
│ │ ├── category
│ │ │ └── [categorySlug]
│ │ │ │ ├── [paginationTerm]
│ │ │ │ └── [categoryCursor].tsx
│ │ │ │ └── index.tsx
│ │ ├── custom-page.tsx
│ │ ├── index.tsx
│ │ ├── posts
│ │ │ ├── [postSlug]
│ │ │ │ ├── [postCursor].tsx
│ │ │ │ └── index.tsx
│ │ │ └── index.tsx
│ │ └── preview.tsx
│ └── scss
│ │ ├── _typography.scss
│ │ ├── _variables.scss
│ │ ├── components
│ │ ├── CTA.module.scss
│ │ ├── Footer.module.scss
│ │ ├── Header.module.scss
│ │ ├── Hero.module.scss
│ │ └── Posts.module.scss
│ │ ├── main.scss
│ │ └── pages
│ │ ├── home.module.scss
│ │ └── posts.module.scss
├── tsconfig.json
└── yarn.lock
├── gatsby
└── README.md
├── next-apollo
├── .gitignore
├── .nvmrc
├── README.md
├── components
│ ├── ActionPreview
│ │ └── ActionPreview.js
│ ├── DocsLayout
│ │ └── DocsLayout.js
│ ├── DocsNav
│ │ └── DocsNav.js
│ ├── DynamicHeroIcon
│ │ └── DynamicHeroIcon.js
│ ├── ExtensionPreview
│ │ └── ExtensionPreview.js
│ ├── FilterPreview
│ │ └── FilterPreview.js
│ ├── FunctionPreview
│ │ └── FunctionPreview.js
│ ├── Heading
│ │ └── Heading.js
│ ├── HomepageCta
│ │ └── HomepageCta.js
│ ├── HomepageFeatures
│ │ └── HomepageFeatures.js
│ ├── HomepageFrameworks
│ │ └── HomepageFrameworks.js
│ ├── HomepageHero
│ │ └── HomepageHero.js
│ ├── HomepageTrust
│ │ └── HomepageTrust.js
│ ├── PostPreview
│ │ └── PostPreview.js
│ ├── PostPreviewCategoryLink
│ │ └── PostPreviewCategoryLink.js
│ ├── RecipePreview
│ │ └── RecipePreview.js
│ ├── SiteFooter
│ │ └── SiteFooter.js
│ ├── SiteHeader
│ │ └── SiteHeader.js
│ ├── SiteLayout
│ │ └── SiteLayout.js
│ ├── SiteLogo
│ │ └── SiteLogo.js
│ ├── TableOfContents
│ │ └── TableOfContents.js
│ └── ThemeToggle
│ │ └── ThemeToggle.js
├── docs
│ ├── authentication-and-authorization.mdx
│ ├── build-extension.mdx
│ ├── build-your-first-wpgraphql-extension.mdx
│ ├── categories-and-tags.mdx
│ ├── comments.mdx
│ ├── connections.mdx
│ ├── contributing.mdx
│ ├── custom-post-types.mdx
│ ├── custom-taxonomies.mdx
│ ├── customizing-wpgraphiql.mdx
│ ├── debugging.mdx
│ ├── default-types-and-fields.mdx
│ ├── docs-nav-menu.yaml
│ ├── faqs.mdx
│ ├── graphql-resolvers.mdx
│ ├── hierarchical-data.mdx
│ ├── index.js
│ ├── interacting-with-wpgraphql.mdx
│ ├── interfaces.mdx
│ ├── intro-to-graphql.mdx
│ ├── intro-to-wordpress.mdx
│ ├── introduction.mdx
│ ├── media.mdx
│ ├── menus.mdx
│ ├── mutations.mdx
│ ├── performance.mdx
│ ├── plugins.mdx
│ ├── posts-and-pages.mdx
│ ├── quick-start.mdx
│ ├── request-lifecycle.mdx
│ ├── security.mdx
│ ├── settings.mdx
│ ├── support.mdx
│ ├── testing.mdx
│ ├── themes.mdx
│ ├── upgrading.mdx
│ ├── use-with-php.mdx
│ ├── users.mdx
│ ├── using-data-from-custom-database-tables.mdx
│ ├── widgets.mdx
│ ├── wordpress-as-an-application-data-graph.mdx
│ ├── wp-graphiql.mdx
│ ├── wpgraphql-concepts.mdx
│ └── wpgraphql-vs-wp-rest-api.mdx
├── graphql.config.js
├── hooks
│ └── useIsomorphicLayoutEffect.js
├── jsconfig.json
├── lib
│ ├── data
│ │ └── apollo.js
│ ├── helpers
│ │ ├── flatListToHierarchical.js
│ │ └── parse-docs.js
│ └── mdx
│ │ └── components.js
├── navs
│ ├── README.md
│ └── documentation.js
├── netlify.toml
├── next.config.js
├── package.json
├── pages
│ ├── 404.js
│ ├── [...WordPressNode].js
│ ├── _app.js
│ ├── _document.js
│ ├── api
│ │ └── hello.js
│ ├── blog.js
│ ├── developer-reference.js
│ ├── docs
│ │ └── [slug].js
│ └── index.js
├── possibleTypes.json
├── postcss.config.js
├── prettier.config.js
├── public
│ ├── application-data-graph.png
│ ├── categories-delete-not-allowed.png
│ ├── categories-delete-success.png
│ ├── categories-mutation-create-not-allowed.png
│ ├── categories-mutation-create-success.png
│ ├── categories-mutation-update-not-allowed.png
│ ├── categories-mutation-update-success.png
│ ├── categories-query-by-global-id.png
│ ├── categories-query-edges-nodes.png
│ ├── categories-query-nodes.png
│ ├── comments-mutation-closed-failure.png
│ ├── comments-mutation-delete-denied.png
│ ├── comments-mutation-delete.png
│ ├── comments-mutation-duplicate-error.png
│ ├── comments-mutation-not-allowed.png
│ ├── comments-mutation-public-user.png
│ ├── comments-mutation-restore-not-allowed.png
│ ├── comments-mutation-restore-success.png
│ ├── comments-mutation-success.png
│ ├── comments-query-post.png
│ ├── connections-graph.png
│ ├── data-graph-category-term-connections.png
│ ├── data-graph-category-terms-connection-complex.png
│ ├── data-graph-category-terms.png
│ ├── data-graph-hello-world.png
│ ├── data-graph-query-filter.png
│ ├── debugging-graphql-query-logs.png
│ ├── debugging-graphql-response.png
│ ├── debugging-graphql-trace-log.png
│ ├── debugging-graphql-unexpected-token.png
│ ├── debugging-output-graphql-debug.png
│ ├── debugging-setting-enable-graphql-query-logs.png
│ ├── debugging-setting-enable-graphql.png
│ ├── debugging-setting-graphql-enable-tracing.png
│ ├── debugging-unexpected-token.gif
│ ├── extension-graphiql-explorer-custom-type.png
│ ├── extension-graphiql-explorer-search.png
│ ├── extension-query-custom-field.png
│ ├── extension-query-custom-type.png
│ ├── extension-wordpress-admin-screen.png
│ ├── extension-wordpress-plugin-dir.png
│ ├── extension-wordpress-plugin-filename.png
│ ├── favicon.ico
│ ├── graphiql-auth-switch.gif
│ ├── graphiql-full-window-mode.gif
│ ├── graphiql-ide-screenshot.png
│ ├── graphiql-query-composer.gif
│ ├── graphiql-query-posts.png
│ ├── interacting-fetch-graphql-from-browser-console-1024x619.gif
│ ├── interacting-wordpress-admin-graphiql.png
│ ├── intro-graphql-MenuItems.gif
│ ├── intro-graphql-fragments.png
│ ├── logo-wpgraphql.png
│ ├── logo-wpgraphql.svg
│ ├── logos
│ │ ├── logo-angular.png
│ │ ├── logo-apollo.png
│ │ ├── logo-credit-karma.png
│ │ ├── logo-denverpost.svg
│ │ ├── logo-dfuzr.png
│ │ ├── logo-ember.png
│ │ ├── logo-funkhaus.png
│ │ ├── logo-gatsby.png
│ │ ├── logo-harness.png
│ │ ├── logo-hope-lab.png
│ │ ├── logo-nevernull.webp
│ │ ├── logo-nextjs.png
│ │ ├── logo-players-tribune.png
│ │ ├── logo-quartz.jpg
│ │ ├── logo-react.png
│ │ ├── logo-svelte.png
│ │ ├── logo-twincities.png
│ │ ├── logo-valu-digital.png
│ │ ├── logo-vue.png
│ │ ├── logo-webdev-studios.png
│ │ ├── logo-zeek.svg
│ │ └── logo-zillow.png
│ ├── media-query-by-global-id.png
│ ├── media-query-by-source-url.png
│ ├── media-query-items.png
│ ├── media-query-post-featured-image.png
│ ├── menus-query-by-global-id.png
│ ├── menus-query-by-name.png
│ ├── menus-query-filter-location.png
│ ├── menus-query-items.png
│ ├── plugins-query-authenticated.png
│ ├── plugins-query-global-id.png
│ ├── plugins-query-id-without-access.png
│ ├── plugins-query-unauthenticated.png
│ ├── posts-mutation-create-not-allowed.png
│ ├── posts-mutation-create-success.png
│ ├── posts-mutation-delete-not-allowed.png
│ ├── posts-mutation-delete-success.png
│ ├── posts-mutation-update-not-allowed.png
│ ├── posts-mutation-update-success.png
│ ├── posts-query-by-database-id.png
│ ├── posts-query-by-global-id.png
│ ├── posts-query-by-slug.png
│ ├── posts-query-by-uri.png
│ ├── posts-query-edges-node.png
│ ├── posts-query-filter-by-author.png
│ ├── posts-query-filter-by-keyword.png
│ ├── posts-query-filter-by-title.png
│ ├── posts-query-nodes.png
│ ├── query-multiple-root-resources.png
│ ├── query-posts.png
│ ├── query-with-graphql.png
│ ├── quick-graphiql-ide-wordpress.png
│ ├── quick-graphiql-ide.png
│ ├── quick-graphiql-search-posts.gif
│ ├── quick-wp-graphql-first-query.gif
│ ├── settings-mutation-authorized.png
│ ├── settings-mutation-not-authorized.png
│ ├── settings-wordpress-general-page-title.png
│ ├── tags-query-by-name.png
│ ├── tags-query-by-uri.png
│ ├── tags-query-nodes.png
│ ├── testing-codeception-screenshot.png
│ ├── themes-authenticated-user.png
│ ├── themes-not-authenticated-user.png
│ ├── users-create-success.png
│ ├── users-create-user-unsuccessful.png
│ ├── users-delete-success.png
│ ├── users-delete-unsuccessful.png
│ ├── users-mutation-register-disabled.png
│ ├── users-mutation-register-success.png
│ ├── users-mutation-reset-password-invalid.png
│ ├── users-query-by-global-id.png
│ ├── users-query.png
│ ├── users-registration-email.png
│ ├── users-update-success.png
│ ├── users-update-unsuccessful.png
│ ├── users-wordpress-new-password.png
│ ├── users-wordpress-reset-password.png
│ ├── vercel.svg
│ ├── wpgraphql-acf-search-schema.gif
│ ├── wpgraphql-nested-query.gif
│ ├── wpgraphql-query-100-posts-graphql.png
│ ├── wpgraphql-query-100-posts-rest.png
│ ├── wpgraphql-query-acf-flex.gif
│ ├── wpgraphql-query-batch-postman.png
│ ├── wpgraphql-query-github.png
│ ├── wpgraphql-query-multiple-resources.png
│ ├── wpgraphql-query-types-fields.png
│ ├── wpgraphql-wordpress-dashboard.png
│ └── wpgraphql-wordpress-rest-api-acf.png
├── redirects.json
├── scripts
│ ├── build-rss.js
│ └── getPossibleTypes.js
├── styles
│ ├── Home.module.css
│ └── globals.css
├── tailwind.config.js
├── templates
│ ├── Archive
│ │ └── Archive.js
│ ├── Author
│ │ └── Author.js
│ ├── Category
│ │ └── Category.js
│ ├── Index
│ │ └── Index.js
│ ├── SingleRecipe
│ │ └── SingleRecipe.js
│ └── Singular
│ │ └── Singular.js
├── wp-next
│ ├── README.md
│ ├── index.js
│ └── template.js
└── yarn.lock
└── remix-run
├── .eslintrc
├── .gitignore
├── .nvmrc
├── README.md
├── app
├── WordPressNode.jsx
├── context
│ └── apollo.js
├── entry.client.jsx
├── entry.server.jsx
├── root.jsx
├── routes
│ ├── $.jsx
│ ├── blog.jsx
│ ├── developer-reference.jsx
│ └── index.jsx
└── styles
│ └── app.css
├── components
├── DocsLayout
│ └── DocsLayout.js
├── DocsNav
│ └── DocsNav.js
├── DynamicHeroIcon
│ └── DynamicHeroIcon.js
├── Heading
│ └── Heading.js
├── HomepageCta
│ └── HomepageCta.js
├── HomepageFeatures
│ └── HomepageFeatures.js
├── HomepageFrameworks
│ └── HomepageFrameworks.js
├── HomepageHero
│ └── HomepageHero.js
├── HomepageTrust
│ └── HomepageTrust.js
├── PostPreview
│ └── PostPreview.js
├── SiteFooter
│ └── SiteFooter.js
├── SiteHeader
│ └── SiteHeader.js
├── SiteLayout
│ └── SiteLayout.js
├── SiteLogo
│ └── SiteLogo.js
├── TableOfContents
│ └── TableOfContents.js
└── ThemeToggle
│ └── ThemeToggle.js
├── hooks
└── useIsomorphicLayoutEffect.js
├── jsconfig.json
├── lib
├── data
│ └── apollo.js
├── helpers
│ ├── flatListToHierarchical.js
│ └── parse-docs.js
└── mdx
│ └── components.js
├── package.json
├── possibleTypes.json
├── public
├── application-data-graph.png
├── categories-delete-not-allowed.png
├── categories-delete-success.png
├── categories-mutation-create-not-allowed.png
├── categories-mutation-create-success.png
├── categories-mutation-update-not-allowed.png
├── categories-mutation-update-success.png
├── categories-query-by-global-id.png
├── categories-query-edges-nodes.png
├── categories-query-nodes.png
├── comments-mutation-closed-failure.png
├── comments-mutation-delete-denied.png
├── comments-mutation-delete.png
├── comments-mutation-duplicate-error.png
├── comments-mutation-not-allowed.png
├── comments-mutation-public-user.png
├── comments-mutation-restore-not-allowed.png
├── comments-mutation-restore-success.png
├── comments-mutation-success.png
├── comments-query-post.png
├── connections-graph.png
├── data-graph-category-term-connections.png
├── data-graph-category-terms-connection-complex.png
├── data-graph-category-terms.png
├── data-graph-hello-world.png
├── data-graph-query-filter.png
├── debugging-graphql-query-logs.png
├── debugging-graphql-response.png
├── debugging-graphql-trace-log.png
├── debugging-graphql-unexpected-token.png
├── debugging-output-graphql-debug.png
├── debugging-setting-enable-graphql-query-logs.png
├── debugging-setting-enable-graphql.png
├── debugging-setting-graphql-enable-tracing.png
├── debugging-unexpected-token.gif
├── extension-graphiql-explorer-custom-type.png
├── extension-graphiql-explorer-search.png
├── extension-query-custom-field.png
├── extension-query-custom-type.png
├── extension-wordpress-admin-screen.png
├── extension-wordpress-plugin-dir.png
├── extension-wordpress-plugin-filename.png
├── favicon.ico
├── graphiql-auth-switch.gif
├── graphiql-full-window-mode.gif
├── graphiql-ide-screenshot.png
├── graphiql-query-composer.gif
├── graphiql-query-posts.png
├── interacting-fetch-graphql-from-browser-console-1024x619.gif
├── interacting-wordpress-admin-graphiql.png
├── intro-graphql-MenuItems.gif
├── intro-graphql-fragments.png
├── logo-wpgraphql.png
├── logo-wpgraphql.svg
├── logos
│ ├── logo-angular.png
│ ├── logo-apollo.png
│ ├── logo-credit-karma.png
│ ├── logo-denverpost.svg
│ ├── logo-dfuzr.png
│ ├── logo-ember.png
│ ├── logo-funkhaus.png
│ ├── logo-gatsby.png
│ ├── logo-harness.png
│ ├── logo-hope-lab.png
│ ├── logo-nevernull.webp
│ ├── logo-nextjs.png
│ ├── logo-players-tribune.png
│ ├── logo-quartz.jpg
│ ├── logo-react.png
│ ├── logo-svelte.png
│ ├── logo-twincities.png
│ ├── logo-valu-digital.png
│ ├── logo-vue.png
│ ├── logo-webdev-studios.png
│ ├── logo-zeek.svg
│ └── logo-zillow.png
├── media-query-by-global-id.png
├── media-query-by-source-url.png
├── media-query-items.png
├── media-query-post-featured-image.png
├── menus-query-by-global-id.png
├── menus-query-by-name.png
├── menus-query-filter-location.png
├── menus-query-items.png
├── plugins-query-authenticated.png
├── plugins-query-global-id.png
├── plugins-query-id-without-access.png
├── plugins-query-unauthenticated.png
├── posts-mutation-create-not-allowed.png
├── posts-mutation-create-success.png
├── posts-mutation-delete-not-allowed.png
├── posts-mutation-delete-success.png
├── posts-mutation-update-not-allowed.png
├── posts-mutation-update-success.png
├── posts-query-by-database-id.png
├── posts-query-by-global-id.png
├── posts-query-by-slug.png
├── posts-query-by-uri.png
├── posts-query-edges-node.png
├── posts-query-filter-by-author.png
├── posts-query-filter-by-keyword.png
├── posts-query-filter-by-title.png
├── posts-query-nodes.png
├── query-multiple-root-resources.png
├── query-posts.png
├── query-with-graphql.png
├── quick-graphiql-ide-wordpress.png
├── quick-graphiql-ide.png
├── quick-graphiql-search-posts.gif
├── quick-wp-graphql-first-query.gif
├── settings-mutation-authorized.png
├── settings-mutation-not-authorized.png
├── settings-wordpress-general-page-title.png
├── tags-query-by-name.png
├── tags-query-by-uri.png
├── tags-query-nodes.png
├── testing-codeception-screenshot.png
├── themes-authenticated-user.png
├── themes-not-authenticated-user.png
├── users-create-success.png
├── users-create-user-unsuccessful.png
├── users-delete-success.png
├── users-delete-unsuccessful.png
├── users-mutation-register-disabled.png
├── users-mutation-register-success.png
├── users-mutation-reset-password-invalid.png
├── users-query-by-global-id.png
├── users-query.png
├── users-registration-email.png
├── users-update-success.png
├── users-update-unsuccessful.png
├── users-wordpress-new-password.png
├── users-wordpress-reset-password.png
├── vercel.svg
├── wpgraphql-acf-search-schema.gif
├── wpgraphql-nested-query.gif
├── wpgraphql-query-100-posts-graphql.png
├── wpgraphql-query-100-posts-rest.png
├── wpgraphql-query-acf-flex.gif
├── wpgraphql-query-batch-postman.png
├── wpgraphql-query-github.png
├── wpgraphql-query-multiple-resources.png
├── wpgraphql-query-types-fields.png
├── wpgraphql-wordpress-dashboard.png
└── wpgraphql-wordpress-rest-api-acf.png
├── remix.config.js
├── scripts
├── build-rss.js
└── getPossibleTypes.js
├── server.js
├── styles
└── app.css
├── tailwind.config.js
├── templates
├── Archive
│ └── Archive.js
├── Author
│ └── Author.js
├── Category
│ └── Category.js
├── Index
│ └── Index.js
└── Singular
│ └── Singular.js
├── vercel.json
├── wp-remix
├── README.md
├── index.js
└── template.js
└── yarn.lock
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | remix-run/old
3 | remix-run/cache
4 | remix-run/build
5 | remix-run/public
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # WPGraphQL Template Hierarchy Debugger
2 |
3 | This is a project to demonstrate how to re-create the WordPress template hierarchy with Headless WordPress using WPGraphQL.
4 |
5 | ## Examples
6 |
7 | - Express.js (see the `/express` directory)
8 | - Gatsby.js (future)
9 | - NextJS (future)
10 | - Remix Run (future)
11 |
--------------------------------------------------------------------------------
/express/README.md:
--------------------------------------------------------------------------------
1 | # Express JS - WordPress Template Hierarchy
2 |
3 | This project shows how ExpressJS can be used to re-create the WordPress template hierarchy using WPGraphQL.
4 |
5 | ## Run the app
6 |
7 | 1. Install dependencies by running `npm install` or `yarn`
8 | 2. Run the app by running `npm run start` or `yarn start`
9 | 3. Visit `http://localhost:3000` in your browser.
10 |
11 | You should see something like so:
12 |
13 | 
14 |
15 | ## Use the App
16 |
17 | Copy the path of any resource from demo.wpgraphql.com and add it as the path to `localhost:3000`.
18 |
19 | For example, take the path for the blog post at
20 | `https://demo.wpgraphql.com/blog/tiled-gallery/`
21 |
22 | and enter it into your browser like so:
23 |
24 | `http://localhost:3000/blog/tiled-gallery/`
25 |
26 | You should see the template hierarchy for this path, like so:
27 |
28 | 
29 |
--------------------------------------------------------------------------------
/express/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | compact: true,
3 | presets: [
4 | [
5 | '@babel/env',
6 | {
7 | modules: false,
8 | targets: {
9 | node: 'current',
10 | },
11 | },
12 | ],
13 | '@babel/react',
14 | '@babel/typescript',
15 | ],
16 | plugins: [
17 | '@babel/proposal-object-rest-spread',
18 | '@babel/proposal-class-properties',
19 | '@babel/proposal-optional-chaining',
20 | '@babel/syntax-dynamic-import',
21 | 'macros',
22 | ],
23 | env: {
24 | test: {
25 | plugins: [
26 | '@babel/transform-modules-commonjs',
27 | '@babel/syntax-dynamic-import',
28 | '@babel/plugin-transform-runtime',
29 | ],
30 | },
31 | },
32 | };
--------------------------------------------------------------------------------
/express/docs/img/express-app.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/express/docs/img/express-app.png
--------------------------------------------------------------------------------
/express/docs/img/usage-screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/express/docs/img/usage-screenshot.png
--------------------------------------------------------------------------------
/express/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "wp-express",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1",
8 | "start": "nodemon app.js"
9 | },
10 | "author": "",
11 | "license": "ISC",
12 | "dependencies": {
13 | "express": "^4.17.1",
14 | "node-fetch": "^2.6.6",
15 | "nodemon": "^2.0.15",
16 | "whatwg-fetch": "^3.6.2"
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/express/templates/index.js:
--------------------------------------------------------------------------------
1 | const Index = () => {
2 | return (
3 |
Index Template!
4 | )
5 | }
6 |
7 | export default Index;
--------------------------------------------------------------------------------
/faust/.env.local.sample:
--------------------------------------------------------------------------------
1 | # Your WordPress site URL
2 | NEXT_PUBLIC_WORDPRESS_URL=https://headlessfw.wpengine.com
3 |
4 | # Plugin secret found in WordPress Settings->Headless
5 | FAUSTWP_SECRET_KEY=YOUR_PLUGIN_SECRET
6 |
--------------------------------------------------------------------------------
/faust/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "next"
3 | }
4 |
--------------------------------------------------------------------------------
/faust/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # next.js
12 | /.next/
13 | /out/
14 |
15 | # production
16 | /build
17 |
18 | # misc
19 | .DS_Store
20 | *.pem
21 |
22 | # debug
23 | npm-debug.log*
24 | yarn-debug.log*
25 | yarn-error.log*
26 |
27 | # dotenv files
28 | .env
29 | .env.test
30 | .env.production
31 | .env.local
32 | .env.development.local
33 | .env.test.local
34 | .env.production.local
35 |
36 | # vercel
37 | .vercel
38 |
--------------------------------------------------------------------------------
/faust/README.md:
--------------------------------------------------------------------------------
1 | # FaustJS
2 |
3 | NOTE: I wasn't able to get this to a working state yet. use at your own risk.
--------------------------------------------------------------------------------
/faust/gqty.config.js:
--------------------------------------------------------------------------------
1 | require('dotenv-flow').config();
2 |
3 | /**
4 | * @type {import("@gqty/cli").GQtyConfig}
5 | */
6 | const config = {
7 | react: false,
8 | scalarTypes: { DateTime: 'string' },
9 | introspection: {
10 | endpoint: `${process.env.NEXT_PUBLIC_WORDPRESS_URL}/graphql`,
11 | headers: {},
12 | },
13 | destination: './src/client/index.ts',
14 | subscriptions: false,
15 | javascriptOutput: false,
16 | };
17 |
18 | console.log(`Using "${config.introspection.endpoint}" to generate schema...`);
19 |
20 | module.exports = config;
21 |
--------------------------------------------------------------------------------
/faust/next-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
4 | // NOTE: This file should not be edited
5 | // see https://nextjs.org/docs/basic-features/typescript for more information.
6 |
--------------------------------------------------------------------------------
/faust/next.config.js:
--------------------------------------------------------------------------------
1 | const { withFaust } = require('@faustjs/next');
2 |
3 | /**
4 | * @type {import('next').NextConfig}
5 | **/
6 | module.exports = withFaust();
7 |
--------------------------------------------------------------------------------
/faust/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "next-headless-getting-started",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "dev": "next dev",
7 | "build": "next build",
8 | "start": "next start",
9 | "clean": "rimraf .next node_modules",
10 | "lint": "next lint",
11 | "generate": "gqty generate",
12 | "wpe-build": "next build"
13 | },
14 | "dependencies": {
15 | "@faustjs/core": "^0.15.1",
16 | "@faustjs/next": "^0.15.1",
17 | "next": "^12.0.7",
18 | "normalize.css": "^8.0.1",
19 | "react": "^17.0.2",
20 | "react-dom": "^17.0.2",
21 | "sass": "^1.44.0"
22 | },
23 | "devDependencies": {
24 | "@gqty/cli": "^2.3.1",
25 | "@types/react": "^17.0.37",
26 | "dotenv-flow": "3.2.0",
27 | "eslint": "^8.4.1",
28 | "eslint-config-next": "^12.0.7",
29 | "rimraf": "^3.0.2",
30 | "typescript": "^4.5.2"
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/faust/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/faust/public/favicon.ico
--------------------------------------------------------------------------------
/faust/public/images/headless_hero_background.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/faust/public/images/headless_hero_background.jpg
--------------------------------------------------------------------------------
/faust/src/client/index.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * GQTY: You can safely modify this file and Query Fetcher based on your needs
3 | */
4 | import type { IncomingMessage } from 'http';
5 | import { getClient } from '@faustjs/next';
6 | import {
7 | generatedSchema,
8 | scalarsEnumsHash,
9 | GeneratedSchema,
10 | SchemaObjectTypes,
11 | SchemaObjectTypesNames,
12 | } from './schema.generated';
13 |
14 | export const client = getClient<
15 | GeneratedSchema,
16 | SchemaObjectTypesNames,
17 | SchemaObjectTypes
18 | >({
19 | schema: generatedSchema,
20 | scalarsEnumsHash,
21 | });
22 |
23 | export function serverClient(req: IncomingMessage) {
24 | return getClient({
25 | schema: generatedSchema,
26 | scalarsEnumsHash,
27 | context: req,
28 | });
29 | }
30 |
31 | export * from './schema.generated';
32 |
--------------------------------------------------------------------------------
/faust/src/components/CTA.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import styles from 'scss/components/CTA.module.scss';
3 | import Heading, { HeadingProps } from './Heading';
4 |
5 | interface Props {
6 | title: string;
7 | buttonText?: string;
8 | buttonURL?: string;
9 | children?: React.ReactNode;
10 | headingLevel?: HeadingProps['level'];
11 | }
12 |
13 | function CTA({
14 | title = 'Get in touch',
15 | buttonText,
16 | buttonURL,
17 | children,
18 | headingLevel = 'h1',
19 | }: Props): JSX.Element {
20 | return (
21 |
22 |
23 |
24 | {title}
25 |
26 |
27 |
{children}
28 | {buttonText && buttonURL && (
29 |
34 | )}
35 |
36 |
37 |
38 | );
39 | }
40 |
41 | export default CTA;
42 |
--------------------------------------------------------------------------------
/faust/src/components/Footer.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import styles from 'scss/components/Footer.module.scss';
3 |
4 | interface Props {
5 | copyrightHolder?: string;
6 | }
7 |
8 | function Footer({ copyrightHolder = 'Company Name' }: Props): JSX.Element {
9 | const year = new Date().getFullYear();
10 |
11 | return (
12 |
17 | );
18 | }
19 |
20 | export default Footer;
21 |
--------------------------------------------------------------------------------
/faust/src/components/Heading.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | // HeadingProps constrains headings to levels h1-h6.
4 | interface HeadingProps extends React.HTMLAttributes {
5 | level: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
6 | }
7 |
8 | // Heading allows components to pass a heading level via props.
9 | function Heading({
10 | level = 'h1',
11 | children,
12 | className,
13 | }: HeadingProps): JSX.Element {
14 | const H = ({ ...props }: React.HTMLAttributes) =>
15 | React.createElement(level, props, children);
16 |
17 | return {children} ;
18 | }
19 |
20 | export default Heading;
21 | export type { HeadingProps };
22 |
--------------------------------------------------------------------------------
/faust/src/components/Hero.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import styles from 'scss/components/Hero.module.scss';
3 |
4 | interface Props {
5 | title: string;
6 | id?: string;
7 | bgImage?: string;
8 | buttonText?: string;
9 | buttonURL?: string;
10 | button2Text?: string;
11 | button2URL?: string;
12 | children?: React.ReactNode;
13 | }
14 |
15 | function Hero({
16 | title = 'Hero Title',
17 | id,
18 | bgImage,
19 | buttonText,
20 | buttonURL,
21 | button2Text,
22 | button2URL,
23 | children,
24 | }: Props): JSX.Element {
25 | return (
26 |
52 | );
53 | }
54 |
55 | export default Hero;
56 |
--------------------------------------------------------------------------------
/faust/src/components/Pagination.tsx:
--------------------------------------------------------------------------------
1 | import Link from 'next/link';
2 | import type { WPPageInfo } from 'client';
3 |
4 | interface NextPageNavigationProps {
5 | href: string;
6 | }
7 |
8 | function NextPageNavigation(props: NextPageNavigationProps) {
9 | return (
10 |
11 | Next Page →
12 |
13 | );
14 | }
15 |
16 | interface PreviousPageNavigationProps {
17 | href: string;
18 | }
19 |
20 | function PreviousPageNavigation(props: PreviousPageNavigationProps) {
21 | return (
22 |
23 | ← Previous Page
24 |
25 | );
26 | }
27 |
28 | export interface PaginationProps {
29 | pageInfo: WPPageInfo;
30 | basePath: string;
31 | }
32 |
33 | export default function Pagination({ pageInfo, basePath }: PaginationProps) {
34 | const previousPageUrl = `${basePath}/before/${pageInfo?.startCursor}`;
35 | const nextPageUrl = `${basePath}/after/${pageInfo?.endCursor}`;
36 |
37 | return (
38 |
39 |
40 |
41 | {pageInfo.hasPreviousPage && (
42 |
43 |
44 |
45 | )}
46 |
47 | {pageInfo.hasNextPage && (
48 |
49 |
50 |
51 | )}
52 |
53 |
54 |
55 | );
56 | }
57 |
--------------------------------------------------------------------------------
/faust/src/components/index.ts:
--------------------------------------------------------------------------------
1 | import CTA from './CTA';
2 | import Footer from './Footer';
3 | import Header from './Header';
4 | import Hero from './Hero';
5 | import Posts from './Posts';
6 | import Pagination from './Pagination';
7 |
8 | export { CTA, Footer, Header, Hero, Posts, Pagination };
9 |
--------------------------------------------------------------------------------
/faust/src/faust.config.js:
--------------------------------------------------------------------------------
1 | import { config as coreConfig } from '@faustjs/core';
2 |
3 | if (!process.env.NEXT_PUBLIC_WORDPRESS_URL) {
4 | console.error(
5 | 'You must provide a NEXT_PUBLIC_WORDPRESS_URL environment variable, did you forget to load your .env.local file?',
6 | );
7 | }
8 |
9 | /**
10 | * @type {import("@faustjs/core").Config}
11 | */
12 | export default coreConfig({
13 | wpUrl: process.env.NEXT_PUBLIC_WORDPRESS_URL,
14 | apiClientSecret: process.env.FAUSTWP_SECRET_KEY,
15 | });
16 |
--------------------------------------------------------------------------------
/faust/src/lib/utils/flatListToHierarchical.js:
--------------------------------------------------------------------------------
1 | export const flatListToHierarchical = (
2 | data = [],
3 | {idKey='key',parentKey='parentId',childrenKey='children'} = {}
4 | ) => {
5 | const tree = [];
6 | const childrenOf = {};
7 | data.forEach((item) => {
8 | const newItem = {...item};
9 | const { [idKey]: id, [parentKey]: parentId = 0 } = newItem;
10 | childrenOf[id] = childrenOf[id] || [];
11 | newItem[childrenKey] = childrenOf[id];
12 | parentId
13 | ? (
14 | childrenOf[parentId] = childrenOf[parentId] || []
15 | ).push(newItem)
16 | : tree.push(newItem);
17 | });
18 | return tree;
19 | };
--------------------------------------------------------------------------------
/faust/src/pages/404.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { client } from 'client';
3 | import { Header, Hero, Footer } from '../components';
4 |
5 | export default function Page(): JSX.Element {
6 | const { useQuery } = client;
7 | const generalSettings = useQuery().generalSettings;
8 |
9 | return (
10 | <>
11 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | The page you were looking for does not exist or is no longer
22 | available.
23 |
24 |
25 |
26 |
27 |
28 |
29 | >
30 | );
31 | }
32 |
--------------------------------------------------------------------------------
/faust/src/pages/[...pageUri].tsx:
--------------------------------------------------------------------------------
1 | import { getNextStaticProps, is404 } from '@faustjs/next';
2 | import { Footer, Header, Hero } from 'components';
3 | import { GetStaticPropsContext } from 'next';
4 | import Head from 'next/head';
5 | import { client, Page as PageType } from 'client';
6 |
7 | export interface PageProps {
8 | page: PageType | PageType['preview']['node'] | null | undefined;
9 | }
10 |
11 | export function PageComponent({ page }: PageProps) {
12 | const { useQuery } = client;
13 | const generalSettings = useQuery().generalSettings;
14 |
15 | return (
16 | <>
17 |
21 |
22 |
23 |
24 | {page?.title()} - {generalSettings.title}
25 |
26 |
27 |
28 |
32 |
33 |
34 |
37 |
38 |
39 |
40 | >
41 | );
42 | }
43 |
44 | export default function Page() {
45 | const { usePage } = client;
46 | const page = usePage();
47 |
48 | return ;
49 | }
50 |
51 | export async function getStaticProps(context: GetStaticPropsContext) {
52 | return getNextStaticProps(context, {
53 | Page,
54 | client,
55 | notFound: await is404(context, { client }),
56 | });
57 | }
58 |
59 | export function getStaticPaths() {
60 | return {
61 | paths: [],
62 | fallback: 'blocking',
63 | };
64 | }
65 |
--------------------------------------------------------------------------------
/faust/src/pages/_app.tsx:
--------------------------------------------------------------------------------
1 | import 'faust.config';
2 | import { FaustProvider } from '@faustjs/next';
3 | import 'normalize.css/normalize.css';
4 | import React from 'react';
5 | import 'scss/main.scss';
6 | import { client } from 'client';
7 | import type { AppProps } from 'next/app';
8 |
9 | export default function MyApp({ Component, pageProps }: AppProps) {
10 | return (
11 | <>
12 |
13 |
14 |
15 | >
16 | );
17 | }
18 |
--------------------------------------------------------------------------------
/faust/src/pages/_document.tsx:
--------------------------------------------------------------------------------
1 | import Document, { Html, Head, Main, NextScript } from 'next/document';
2 |
3 | class MyDocument extends Document {
4 | render() {
5 | return (
6 |
7 |
8 |
13 |
18 |
24 |
25 |
26 |
27 |
28 |
29 |
30 | );
31 | }
32 | }
33 |
34 | export default MyDocument;
35 |
--------------------------------------------------------------------------------
/faust/src/pages/api/faust/[[...route]].ts:
--------------------------------------------------------------------------------
1 | import 'faust.config';
2 | import { apiRouter } from '@faustjs/core/api';
3 |
4 | export default apiRouter;
5 |
--------------------------------------------------------------------------------
/faust/src/pages/category/[categorySlug]/[paginationTerm]/[categoryCursor].tsx:
--------------------------------------------------------------------------------
1 | import { GetStaticPropsContext } from 'next';
2 | import Page from 'pages/category/[categorySlug]';
3 | import { getNextStaticProps } from '@faustjs/next';
4 | import { client } from 'client';
5 |
6 | export default Page;
7 |
8 | export async function getStaticProps(context: GetStaticPropsContext) {
9 | const { paginationTerm } = context.params;
10 | if (!(paginationTerm === 'after' || paginationTerm === 'before')) {
11 | return {
12 | notFound: true,
13 | };
14 | }
15 |
16 | return getNextStaticProps(context, {
17 | Page,
18 | client,
19 | });
20 | }
21 |
22 | export function getStaticPaths() {
23 | return {
24 | paths: [],
25 | fallback: 'blocking',
26 | };
27 | }
28 |
--------------------------------------------------------------------------------
/faust/src/pages/category/[categorySlug]/index.tsx:
--------------------------------------------------------------------------------
1 | import { getNextStaticProps, is404 } from '@faustjs/next';
2 | import Head from 'next/head';
3 | import { Header, Footer, Posts, Pagination } from 'components';
4 | import { GetStaticPropsContext } from 'next';
5 | import { useRouter } from 'next/router';
6 | import { client } from 'client';
7 |
8 | const POSTS_PER_PAGE = 6;
9 |
10 | export default function Page() {
11 | const { useQuery, usePosts, useCategory } = client;
12 | const { query = {} } = useRouter();
13 | const { categorySlug, paginationTerm, categoryCursor } = query;
14 | const generalSettings = useQuery().generalSettings;
15 | const category = useCategory();
16 | const isBefore = paginationTerm === 'before';
17 | const posts = usePosts({
18 | after: !isBefore ? (categoryCursor as string) : undefined,
19 | before: isBefore ? (categoryCursor as string) : undefined,
20 | first: !isBefore ? POSTS_PER_PAGE : undefined,
21 | last: isBefore ? POSTS_PER_PAGE : undefined,
22 | });
23 |
24 | return (
25 | <>
26 |
30 |
31 |
32 | Posts - {generalSettings?.title}
33 |
34 |
35 |
36 |
37 |
Category: {category?.name}
38 |
39 |
40 |
44 |
45 |
46 |
47 |
48 | >
49 | );
50 | }
51 |
52 | export async function getStaticProps(context: GetStaticPropsContext) {
53 | return getNextStaticProps(context, {
54 | Page,
55 | client,
56 | notFound: await is404(context, { client }),
57 | });
58 | }
59 |
60 | export function getStaticPaths() {
61 | return {
62 | paths: [],
63 | fallback: 'blocking',
64 | };
65 | }
66 |
--------------------------------------------------------------------------------
/faust/src/pages/custom-page.tsx:
--------------------------------------------------------------------------------
1 | import { getNextStaticProps } from '@faustjs/next';
2 | import { client } from 'client';
3 | import { Footer, Header, Hero } from 'components';
4 | import { GetStaticPropsContext } from 'next';
5 | import Head from 'next/head';
6 |
7 | export default function Page() {
8 | const { useQuery } = client;
9 | const generalSettings = useQuery().generalSettings;
10 |
11 | return (
12 | <>
13 |
17 |
18 |
19 | Custom Page - {generalSettings.title}
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 | You can still create pages just as you would in{' '}
28 |
32 | Next.js
33 |
34 | . Take a look at src/pages/custom-page.tsx
for an
35 | example.
36 |
37 |
38 |
39 |
40 |
41 | >
42 | );
43 | }
44 |
45 | export async function getStaticProps(context: GetStaticPropsContext) {
46 | return getNextStaticProps(context, {
47 | Page,
48 | client,
49 | });
50 | }
51 |
--------------------------------------------------------------------------------
/faust/src/pages/posts/[postSlug]/[postCursor].tsx:
--------------------------------------------------------------------------------
1 | import { getNextStaticProps } from '@faustjs/next';
2 | import { GetStaticPropsContext } from 'next';
3 | import Page from '..';
4 | import { client } from 'client';
5 |
6 | export default Page;
7 |
8 | export async function getStaticProps(context: GetStaticPropsContext) {
9 | const { postSlug } = context.params;
10 |
11 | if (!(postSlug === 'after' || postSlug === 'before')) {
12 | return {
13 | notFound: true,
14 | };
15 | }
16 |
17 | return getNextStaticProps(context, {
18 | Page,
19 | client,
20 | });
21 | }
22 |
23 | export function getStaticPaths() {
24 | return {
25 | paths: [],
26 | fallback: 'blocking',
27 | };
28 | }
29 |
--------------------------------------------------------------------------------
/faust/src/pages/posts/[postSlug]/index.tsx:
--------------------------------------------------------------------------------
1 | import { getNextStaticProps, is404 } from '@faustjs/next';
2 | import { client, Post } from 'client';
3 | import { Footer, Header, Hero } from 'components';
4 | import { GetStaticPropsContext } from 'next';
5 | import Head from 'next/head';
6 |
7 | export interface PostProps {
8 | post: Post | Post['preview']['node'] | null | undefined;
9 | }
10 |
11 | export function PostComponent({ post }: PostProps) {
12 | const { useQuery } = client;
13 | const generalSettings = useQuery().generalSettings;
14 |
15 | return (
16 | <>
17 |
21 |
22 |
23 |
24 | {post?.title()} - {generalSettings.title}
25 |
26 |
27 |
28 |
32 |
33 |
34 |
37 |
38 |
39 |
40 | >
41 | );
42 | }
43 |
44 | export default function Page() {
45 | const { usePost } = client;
46 | const post = usePost();
47 |
48 | return ;
49 | }
50 |
51 | export async function getStaticProps(context: GetStaticPropsContext) {
52 | return getNextStaticProps(context, {
53 | Page,
54 | client,
55 | notFound: await is404(context, { client }),
56 | });
57 | }
58 |
59 | export function getStaticPaths() {
60 | return {
61 | paths: [],
62 | fallback: 'blocking',
63 | };
64 | }
65 |
--------------------------------------------------------------------------------
/faust/src/pages/posts/index.tsx:
--------------------------------------------------------------------------------
1 | import { getNextStaticProps } from '@faustjs/next';
2 | import { client, OrderEnum, PostObjectsConnectionOrderbyEnum } from 'client';
3 | import { Footer, Header, Pagination, Posts } from 'components';
4 | import { GetStaticPropsContext } from 'next';
5 | import Head from 'next/head';
6 | import { useRouter } from 'next/router';
7 | import React from 'react';
8 | import styles from 'scss/pages/posts.module.scss';
9 |
10 | const POSTS_PER_PAGE = 6;
11 |
12 | export default function Page() {
13 | const { query = {} } = useRouter();
14 | const { postSlug, postCursor } = query;
15 | const { usePosts, useQuery } = client;
16 | const generalSettings = useQuery().generalSettings;
17 | const isBefore = postSlug === 'before';
18 | const posts = usePosts({
19 | after: !isBefore ? (postCursor as string) : undefined,
20 | before: isBefore ? (postCursor as string) : undefined,
21 | first: !isBefore ? POSTS_PER_PAGE : undefined,
22 | last: isBefore ? POSTS_PER_PAGE : undefined,
23 | });
24 |
25 | if (useQuery().$state.isLoading) {
26 | return null;
27 | }
28 |
29 | return (
30 | <>
31 |
35 |
36 |
37 |
38 | {generalSettings.title} - {generalSettings.description}
39 |
40 |
41 |
42 |
43 |
50 |
51 |
52 |
53 |
54 | >
55 | );
56 | }
57 |
58 | export async function getStaticProps(context: GetStaticPropsContext) {
59 | return getNextStaticProps(context, {
60 | Page,
61 | client,
62 | });
63 | }
64 |
--------------------------------------------------------------------------------
/faust/src/pages/preview.tsx:
--------------------------------------------------------------------------------
1 | import { PageComponent } from './[...pageUri]';
2 | import { PostComponent } from './posts/[postSlug]';
3 | import { client } from 'client';
4 |
5 | export default function Preview() {
6 | const { usePreview } = client.auth;
7 | const result = usePreview();
8 |
9 | if (client.useIsLoading() || !result) {
10 | return loading...
;
11 | }
12 |
13 | if (result.type === 'page') {
14 | if (!result.page) {
15 | return <>Not Found>;
16 | }
17 |
18 | return ;
19 | }
20 |
21 | if (!result.post) {
22 | return <>Not Found>;
23 | }
24 |
25 | return ;
26 | }
27 |
--------------------------------------------------------------------------------
/faust/src/scss/_typography.scss:
--------------------------------------------------------------------------------
1 | @import "variables";
2 |
3 | body {
4 | font-family: $font-family;
5 | font-weight: $font-weight-normal;
6 | }
7 |
8 | h1, h2, h3, h4, h5, h6 {
9 | font-family: $font-family;
10 | font-weight: $font-weight-bold;
11 | line-height: 1.2;
12 | margin-bottom: 0.5em;
13 | }
14 |
15 | h1 {
16 | font-size: 3.5em;
17 | }
18 |
19 | h2 {
20 | font-size: 2.5em;
21 | }
22 |
23 | h3 {
24 | font-size: 1.4em;
25 | }
26 |
27 | h4 {
28 | font-size: 1.2em;
29 | }
30 |
31 | h5 {
32 | font-size: 1.1em;
33 | }
34 |
35 | h6 {
36 | font-size: 1em;
37 | }
38 |
39 | p {
40 | margin-bottom: 1.2em;
41 | }
42 |
43 | a {
44 | color: $color-primary;
45 | }
46 |
47 | a:focus,
48 | a:hover {
49 | color: lighten($color-primary, 15);
50 | }
51 |
--------------------------------------------------------------------------------
/faust/src/scss/_variables.scss:
--------------------------------------------------------------------------------
1 | $color-primary: #0070f3;
2 | $color-black: #000;
3 | $color-white: #fff;
4 | $color-dark-gray: #1f1f1f;
5 | $color-light-gray: #f2f2f2;
6 | $color-mid-gray: #606060;
7 |
8 | $font-family: "Public Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
9 | $font-weight-normal: 300;
10 | $font-weight-bold: 600;
11 |
12 | $content-width: 1200px;
13 | $content-width-extended: 1400px;
14 |
15 | $breakpoint-small: 600px;
16 | $breakpoint-medium: 1000px;
17 |
--------------------------------------------------------------------------------
/faust/src/scss/components/CTA.module.scss:
--------------------------------------------------------------------------------
1 | // CSS for the CTA component in components/CTA.tsx.
2 |
3 | @import "scss/variables";
4 |
5 | .cta {
6 | background-color: $color-dark-gray;
7 | color: $color-white;
8 | padding: 10em 0 12em;
9 | }
10 |
11 | .cta a {
12 | color: $color-white;
13 | }
14 |
15 | .wrap {
16 | margin: 0 auto;
17 | max-width: $content-width;
18 | text-align: center;
19 | }
20 |
21 | .children a:focus,
22 | .children a:hover {
23 | color: darken($color-white, 25);
24 | }
25 |
26 | .title {
27 | margin: 0 auto;
28 | max-width: 80%;
29 | }
30 |
31 | .intro {
32 | max-width: 80%;
33 | margin: 0 auto;
34 | }
35 |
36 | .button-wrap {
37 | display: block;
38 | text-align: center;
39 | }
40 |
41 | .button-wrap :global(.button) {
42 | float: none;
43 | }
44 |
--------------------------------------------------------------------------------
/faust/src/scss/components/Footer.module.scss:
--------------------------------------------------------------------------------
1 | // CSS for the Footer component in components/Footer.tsx.
2 |
3 | @import "scss/variables";
4 |
5 | .wrap {
6 | margin: 0 auto;
7 | max-width: $content-width-extended;
8 | padding: 0 10px;
9 | }
10 |
11 | @media screen and (min-width: $content-width-extended) {
12 | .wrap {
13 | padding: 0;
14 | }
15 | }
16 |
17 | footer.main {
18 | background: $color-light-gray;
19 | height: 100px;
20 | }
21 |
22 | footer.main p {
23 | color: $color-dark-gray;
24 | line-height: 100px;
25 | margin: 0;
26 | }
27 |
--------------------------------------------------------------------------------
/faust/src/scss/components/Hero.module.scss:
--------------------------------------------------------------------------------
1 | // CSS for the Hero component in components/Hero.tsx.
2 |
3 | @import "scss/variables";
4 |
5 | .hero {
6 | background-color: $color-dark-gray;
7 | background-position: 48% 72%;
8 | background-size: cover;
9 | background-repeat: no-repeat;
10 | color: $color-white;
11 | padding: 7em 0 9em;
12 | position: relative;
13 | }
14 |
15 | .wrap {
16 | margin: 0 auto;
17 | max-width: $content-width;
18 | overflow: auto;
19 | padding: 0 10px;
20 | position: relative;
21 | z-index: 1;
22 | }
23 |
24 | @media screen and (min-width: $content-width) {
25 | .wrap {
26 | padding: 0;
27 | }
28 | }
29 |
30 | .hero::before {
31 | content: "";
32 | position: absolute;
33 | top: 0;
34 | left: 0;
35 | bottom: 0;
36 | right: 0;
37 | background-color: inherit;
38 | opacity: 0.8;
39 | z-index: 1;
40 | }
41 |
42 | .hero a {
43 | color: $color-white;
44 | }
45 |
46 | .children a:focus,
47 | .children a:hover {
48 | color: darken($color-white, 25);
49 | }
50 |
51 | @media screen and (min-width: $breakpoint-medium) {
52 | .hero h1 {
53 | max-width: 80%;
54 | }
55 |
56 | .intro {
57 | margin-bottom: 2%;
58 | max-width: 50%;
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/faust/src/scss/components/Posts.module.scss:
--------------------------------------------------------------------------------
1 | // CSS for the Posts component in components/Posts.tsx.
2 |
3 | @import "scss/variables";
4 |
5 | .title a {
6 | color: $color-black;
7 | text-decoration: none;
8 | }
9 |
10 | .title a:focus,
11 | .title a:hover {
12 | color: $color-primary;
13 | }
14 |
15 | .single {
16 | margin-bottom: 2.5em;
17 | }
18 |
19 | @media screen and (min-width: $content-width) {
20 | .single {
21 | margin-bottom: 1em;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/faust/src/scss/main.scss:
--------------------------------------------------------------------------------
1 | // CSS for use on every page. Added with normalize.css in pages/_app.tsx.
2 |
3 | @import "variables";
4 | @import "typography";
5 |
6 | body {
7 | color: $color-black;
8 | font-size: 18px;
9 | line-height: 1.6;
10 | }
11 |
12 | .wrap {
13 | margin: 0 auto;
14 | max-width: $content-width;
15 | overflow: auto;
16 | padding: 0 10px;
17 | }
18 |
19 | .content-page .wrap,
20 | .content-single .wrap,
21 | .content-index .wrap {
22 | padding: 55px 10px;
23 | }
24 |
25 | @media screen and (min-width: $content-width) {
26 | .wrap {
27 | padding: 0;
28 | }
29 |
30 | .content-page .wrap,
31 | .content-single .wrap,
32 | .content-index .wrap {
33 | padding-left: 0;
34 | padding-right: 0;
35 | }
36 | }
37 |
38 | .content .button {
39 | background-color: $color-primary;
40 | border-radius: 4px;
41 | color: #ffffff;
42 | cursor: pointer;
43 | display: inline-block;
44 | float: left;
45 | font-family: $font-family;
46 | font-weight: $font-weight-bold;
47 | padding: 12px 24px;
48 | text-align: center;
49 | text-decoration: none;
50 | margin-right: 8px;
51 | }
52 |
53 | .content .button:focus,
54 | .content .button:hover {
55 | background-color: lighten($color-primary, 10);
56 | }
57 |
58 | .content .button-secondary {
59 | background-color: $color-white;
60 | color: $color-black;
61 | }
62 |
63 | .content .button-secondary:focus,
64 | .content .button-secondary:hover {
65 | background-color: darken($color-white, 10);
66 | }
67 |
68 | .pagination ul {
69 | list-style-type: none;
70 | margin: 0;
71 | padding: 0;
72 | }
73 |
74 | .pagination.has-next.has-previous ul {
75 | column-count: 2;
76 | }
77 |
78 | .pagination-next {
79 | text-align: right;
80 | }
81 |
--------------------------------------------------------------------------------
/faust/src/scss/pages/home.module.scss:
--------------------------------------------------------------------------------
1 | // CSS for the index.tsx template.
2 |
3 | @import "scss/variables";
4 |
5 | .explore {
6 | margin: 5em 0 5em;
7 | }
8 |
9 | #post_list {
10 | padding: 5em 0 6em;
11 | background-color: $color-light-gray;
12 | }
13 |
14 | @media screen and (min-width: $breakpoint-medium) {
15 | #home_hero h1 {
16 | max-width: 40%; // Reduced from 80% on the front-page only to wrap the headline.
17 | }
18 |
19 | .features {
20 | column-gap: 20px;
21 | display: grid;
22 | grid-template-columns: 1fr 1fr 1fr;
23 | }
24 |
25 | #post_list :global(.posts) {
26 | display: grid;
27 | column-gap: 10px;
28 | grid-template-columns: 1fr 1fr 1fr;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/faust/src/scss/pages/posts.module.scss:
--------------------------------------------------------------------------------
1 | // CSS for the posts/index.tsx template.
2 |
3 | @import "scss/variables";
4 |
5 | #post_list {
6 | padding: 5em 0 6em;
7 | background-color: $color-light-gray;
8 | }
9 |
10 | @media screen and (min-width: $breakpoint-medium) {
11 | #post_list :global(.posts) {
12 | display: grid;
13 | column-gap: 10px;
14 | grid-template-columns: 1fr 1fr 1fr;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/faust/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "lib": [
5 | "dom",
6 | "dom.iterable",
7 | "esnext"
8 | ],
9 | "allowJs": true,
10 | "skipLibCheck": true,
11 | "strict": false,
12 | "forceConsistentCasingInFileNames": true,
13 | "noEmit": true,
14 | "esModuleInterop": true,
15 | "module": "esnext",
16 | "moduleResolution": "node",
17 | "resolveJsonModule": true,
18 | "isolatedModules": true,
19 | "jsx": "preserve",
20 | "baseUrl": "./src",
21 | "incremental": true
22 | },
23 | "include": [
24 | "next-env.d.ts",
25 | "**/*.ts",
26 | "**/*.tsx"
27 | ],
28 | "exclude": [
29 | "node_modules"
30 | ]
31 | }
32 |
--------------------------------------------------------------------------------
/gatsby/README.md:
--------------------------------------------------------------------------------
1 | # WordPress Template Hierarchy with Gatsby
2 |
3 | @todo
4 |
--------------------------------------------------------------------------------
/next-apollo/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .next
3 | .idea
4 | .env
--------------------------------------------------------------------------------
/next-apollo/.nvmrc:
--------------------------------------------------------------------------------
1 | v14.19.0
--------------------------------------------------------------------------------
/next-apollo/README.md:
--------------------------------------------------------------------------------
1 | This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
2 |
3 | ## Getting Started
4 |
5 | Add a `.env` file with the following contents:
6 |
7 | ```
8 | WPGRAPHQL_ENDPOINT='https://content.wpgraphql.com/graphql
9 | ```
10 |
11 | Next, install dependencies:
12 |
13 | ```bash
14 | yarn
15 | ```
16 |
17 | Then, run the development server:
18 |
19 | ```bash
20 | yarn dev
21 | ```
22 |
--------------------------------------------------------------------------------
/next-apollo/components/ActionPreview/ActionPreview.js:
--------------------------------------------------------------------------------
1 | import { gql } from "@apollo/client"
2 | import Link from "next/link"
3 |
4 | export const ActionPreviewFragment = gql`
5 | fragment ActionPreview on Action {
6 | id
7 | title
8 | content
9 | uri
10 | }
11 | `
12 |
13 | const ActionPreview = ({ node }) => {
14 |
15 | const paragraphs = node?.content ? node.content.split('') : null
16 | const excerpt = paragraphs ? paragraphs[0] + '' : null
17 |
18 | return (
19 |
20 |
{node.title}
21 |
24 |
25 |
32 |
33 | )
34 | }
35 |
36 | export default ActionPreview
--------------------------------------------------------------------------------
/next-apollo/components/DocsLayout/DocsLayout.js:
--------------------------------------------------------------------------------
1 | import DocsNav from 'components/DocsNav/DocsNav'
2 | import SiteLayout from 'components/SiteLayout/SiteLayout'
3 | import SiteFooter from 'components/SiteFooter/SiteFooter'
4 |
5 | const DocsLayout = ({ children }) => {
6 | return (
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | {children}
16 |
17 |
18 |
19 |
20 |
21 |
22 | )
23 | }
24 |
25 | export default DocsLayout
26 |
--------------------------------------------------------------------------------
/next-apollo/components/DocsNav/DocsNav.js:
--------------------------------------------------------------------------------
1 | import { documentationNav } from '/navs/documentation.js'
2 | import Link from 'next/link'
3 |
4 | const getNav = () => {
5 | return Object.keys(documentationNav).map((key, i) => {
6 | const children = documentationNav[key]
7 |
8 | if (children.length > 0) {
9 | return (
10 |
11 |
{key}
12 |
13 | {children.map((child, i) => {
14 | return (
15 |
16 |
17 |
18 | {child.title}
19 |
20 |
21 |
22 | )
23 | })}
24 |
25 |
26 | )
27 | }
28 |
29 | return null
30 | })
31 | }
32 |
33 | const DocsNav = () => {
34 | if (!documentationNav) {
35 | return null
36 | }
37 |
38 | return getNav()
39 | }
40 |
41 | export default DocsNav
42 |
--------------------------------------------------------------------------------
/next-apollo/components/DynamicHeroIcon/DynamicHeroIcon.js:
--------------------------------------------------------------------------------
1 | import * as HIcons from '@heroicons/react/outline'
2 |
3 | /**
4 | * This component allows an icon to be rendered based on the name of the icon (i.e., string passed from a WordPress Nav Menu Item)
5 | * @see: https://github.com/tailwindlabs/heroicons/issues/278#issuecomment-851594776
6 | */
7 | const DynamicHeroIcon = (props) => {
8 | const { ...icons } = HIcons
9 | const TheIcon = icons[props.icon]
10 |
11 | return (
12 | <>
13 |
14 | >
15 | )
16 | }
17 |
18 | export default DynamicHeroIcon
19 |
--------------------------------------------------------------------------------
/next-apollo/components/ExtensionPreview/ExtensionPreview.js:
--------------------------------------------------------------------------------
1 | import { gql } from "@apollo/client";
2 | import { ExternalLinkIcon } from "@heroicons/react/outline";
3 |
4 | export const ExtensionFragment = gql`
5 | fragment ExtensionPreview on ExtensionPlugin {
6 | id
7 | title
8 | uri
9 | content
10 | extensionFields {
11 | pluginHost
12 | pluginLink
13 | pluginReadmeLink
14 | }
15 | }
16 | `
17 |
18 | const ExtensionPreview = ({ extension }) => {
19 | return(
20 |
21 |
{extension.title}
22 |
25 |
30 |
31 | )
32 | };
33 |
34 | export default ExtensionPreview;
--------------------------------------------------------------------------------
/next-apollo/components/FilterPreview/FilterPreview.js:
--------------------------------------------------------------------------------
1 | import { gql } from "@apollo/client"
2 | import Link from "next/link"
3 |
4 | export const FilterPreviewFragment = gql`
5 | fragment FilterPreview on Filter {
6 | id
7 | title
8 | content
9 | uri
10 | }
11 | `
12 |
13 | const FilterPreview = ({ filter }) => {
14 |
15 | const paragraphs = filter?.content ? filter.content.split('') : null
16 | const excerpt = paragraphs ? paragraphs[0] + '' : null
17 |
18 | return (
19 |
20 |
{filter.title}
21 |
24 |
25 |
32 |
33 | )
34 | }
35 |
36 | export default FilterPreview
--------------------------------------------------------------------------------
/next-apollo/components/FunctionPreview/FunctionPreview.js:
--------------------------------------------------------------------------------
1 | import { gql } from "@apollo/client"
2 | import Link from "next/link"
3 |
4 | export const FunctionPreviewFragment = gql`
5 | fragment FunctionPreview on Function {
6 | id
7 | title
8 | content
9 | uri
10 | }
11 | `
12 |
13 | const FunctionPreview = ({ node }) => {
14 |
15 | const paragraphs = node?.content ? node.content.split('') : null
16 | const excerpt = paragraphs ? paragraphs[0] + '' : null
17 |
18 | return (
19 |
20 |
{node.title}
21 |
24 |
25 |
32 |
33 | )
34 | }
35 |
36 | export default FunctionPreview
--------------------------------------------------------------------------------
/next-apollo/components/Heading/Heading.js:
--------------------------------------------------------------------------------
1 | const Heading = (props) => {
2 | return (
3 | <>
4 | Heading...
5 | {JSON.stringify(props, null, 2)}
6 | >
7 | )
8 | }
9 |
10 | export default Heading
11 |
--------------------------------------------------------------------------------
/next-apollo/components/HomepageCta/HomepageCta.js:
--------------------------------------------------------------------------------
1 | /* This example requires Tailwind CSS v2.0+ */
2 | const HomepageCta = () => {
3 | return (
4 |
24 | )
25 | }
26 |
27 | export default HomepageCta
28 |
--------------------------------------------------------------------------------
/next-apollo/components/PostPreviewCategoryLink/PostPreviewCategoryLink.js:
--------------------------------------------------------------------------------
1 | import { gql } from "@apollo/client"
2 | import Link from "next/link"
3 |
4 | export const PostPreviewCategoryLinkFragment = gql`
5 | fragment PostPreviewCategoryLink on Category {
6 | id
7 | name
8 | uri
9 | }
10 | `
11 |
12 | const PostPreviewCategoryLink = ({ category }) => {
13 |
14 | return (
15 |
16 |
17 | {category.name}
18 |
19 |
20 | )
21 | }
22 |
23 | export default PostPreviewCategoryLink
--------------------------------------------------------------------------------
/next-apollo/components/RecipePreview/RecipePreview.js:
--------------------------------------------------------------------------------
1 | import { gql } from "@apollo/client"
2 | import Link from "next/link"
3 |
4 | export const RecipePreviewFragment = gql`
5 | fragment RecipePreview on CodeSnippet {
6 | id
7 | title
8 | content
9 | uri
10 | }
11 | `
12 |
13 | const RecipePreview = ({ recipe }) => {
14 |
15 | const paragraphs = recipe?.content ? recipe.content.split('') : null
16 | const excerpt = paragraphs ? paragraphs[0] + '' : null
17 |
18 | return (
19 |
20 |
{recipe.title}
21 |
24 |
25 |
32 |
33 | )
34 | }
35 |
36 | export default RecipePreview
--------------------------------------------------------------------------------
/next-apollo/components/SiteLayout/SiteLayout.js:
--------------------------------------------------------------------------------
1 | import SiteHeader, { NAV_QUERY } from '../SiteHeader/SiteHeader'
2 |
3 | const SiteLayout = ({ children }) => {
4 | return (
5 | <>
6 |
7 | {children}
8 | >
9 | )
10 | }
11 |
12 | export { NAV_QUERY }
13 |
14 | export default SiteLayout
15 |
--------------------------------------------------------------------------------
/next-apollo/components/SiteLogo/SiteLogo.js:
--------------------------------------------------------------------------------
1 | import Image from 'next/image'
2 |
3 | const SiteLogo = (props) => {
4 | return (
5 |
11 | )
12 | }
13 |
14 | export default SiteLogo
15 |
--------------------------------------------------------------------------------
/next-apollo/components/TableOfContents/TableOfContents.js:
--------------------------------------------------------------------------------
1 | import { useState } from 'react'
2 | import Link from 'next/link'
3 |
4 | const TableOfContents = ({ toc }) => {
5 | if (!toc || !toc.length) {
6 | return null
7 | }
8 |
9 | return (
10 |
11 |
12 | On this page
13 |
14 |
25 |
26 | )
27 | }
28 |
29 | export default TableOfContents
30 |
--------------------------------------------------------------------------------
/next-apollo/docs/build-your-first-wpgraphql-extension.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Build your first WPGraphQL Extension"
3 | ---
--------------------------------------------------------------------------------
/next-apollo/docs/docs-nav-menu.yaml:
--------------------------------------------------------------------------------
1 | - section:
2 | name: Getting Started
3 | items:
4 | - uri: /docs/introduction/
5 | label: Introduction
6 | - uri: /docs/quick-start/
7 | - section:
8 | name: Beginner Guides
9 | items:
10 | - uri: /docs/intro-to-graphql/
11 | - uri: /docs/wp-graphiql/
12 | - uri: /docs/intro-to-wordpress/
13 | - uri: /docs/interacting-with-wpgraphql/
14 | - uri: /docs/build-your-first-wpgraphql-extension/
15 | - uri: /docs/wpgraphql-vs-wp-rest-api/
16 | - section:
17 | name: Using WPGraphQL
18 | items:
19 | - uri: /docs/posts-and-pages/
20 | - uri: /docs/custom-post-types/
21 | - uri: /docs/categories-and-tags/
22 | - uri: /docs/custom-taxonomies/
23 | - uri: /docs/media/
24 | - uri: /docs/menus/
25 | - uri: /docs/settings/
26 | - uri: /docs/users/
27 | - uri: /docs/comments/
28 | - uri: /docs/plugins/
29 | - uri: /docs/themes/
30 | - uri: /docs/widgets/
31 | - section:
32 | name: Dig Deeper
33 | items:
34 | - uri: /docs/wpgraphql-concepts/
35 | - uri: /docs/wordpress-as-an-application-data-graph/
36 | - uri: /docs/wpgraphql-request-lifecycle/
37 | - uri: /docs/default-types-and-fields/
38 | - uri: /docs/connections/
39 | - uri: /docs/interfaces/
40 | - uri: /docs/wpgraphql-mutations/
41 | - uri: /docs/graphql-resolvers/
42 | - uri: /docs/performance/
43 | - uri: /docs/security/
44 | - uri: /docs/authentication-and-authorization/
45 | - uri: /docs/hierarchical-data/
46 | - uri: /docs/debugging/
47 | - uri: /docs/using-data-from-custom-database-tables/
48 | - uri: /docs/use-with-php/
49 | - uri: /docs/customizing-wp-graphiql/
50 | - section:
51 | name: Community
52 | items:
53 | - uri: /docs/contributing/
54 | label: How to Contribute
55 | - uri: /docs/testing/
56 | - uri: /docs/upgrading/
57 | - uri: /docs/faqs/
58 |
--------------------------------------------------------------------------------
/next-apollo/docs/faqs.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | uri: "/docs/faqs/"
3 | title: "Frequently Asked Questions"
4 | ---
5 |
6 | Add some interesting Frequently Asked Questions here.
7 |
--------------------------------------------------------------------------------
/next-apollo/docs/hierarchical-data.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | uri: "/docs/hierarchical-data/"
3 | title: "Hierarchical Data"
4 | ---
5 |
6 | Add some interesting Hierarchical Data here.
7 |
--------------------------------------------------------------------------------
/next-apollo/docs/index.js:
--------------------------------------------------------------------------------
1 | import SiteLayout from 'components/SiteLayout/SiteLayout'
2 |
3 | const Docs = () => {
4 | return (
5 |
6 | Docs
7 |
8 | )
9 | }
10 |
11 | export default Docs
12 |
--------------------------------------------------------------------------------
/next-apollo/docs/interfaces.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | uri: "/docs/interfaces/"
3 | title: "Interfaces"
4 | ---
5 |
6 | Add some interesting interfaces here.
7 |
--------------------------------------------------------------------------------
/next-apollo/docs/mutations.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | uri: "/docs/wpgraphql-mutations/"
3 | title: "Mutations"
4 | ---
5 |
6 | WPGraphQL provides support for Mutations, or the ability to use GraphQL to create, update and delete data managed in WordPress. This page covers general concepts of how WPGraphQL implements mutations. This page will be most useful for developers that are already [familiar with GraphQL](/docs/intro-to-graphql/).
7 |
8 | ## Register a new Mutation
9 |
10 | To register a mutation to the GraphQL Schema, you can use the `register_graphql_mutation` function [documented here](/functions/register_graphql_mutation/).
11 |
--------------------------------------------------------------------------------
/next-apollo/docs/performance.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | uri: "/docs/performance/"
3 | title: "Performance"
4 | ---
5 |
6 | Add some interesting performance details here.
7 |
--------------------------------------------------------------------------------
/next-apollo/docs/support.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Support"
3 | description: "Learn where you can get support in using WPGraphQL"
4 | ---
--------------------------------------------------------------------------------
/next-apollo/docs/themes.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | uri: "/docs/themes/"
3 | title: "Themes"
4 | ---
5 |
6 | This page will be most useful for users what are familiar with [GraphQL Concepts](/docs/intro-to-graphql/) and understand the basics of [writing GraphQL Queries](/docs/intro-to-graphql/#queries-and-mutation).
7 |
8 | ## Querying Themes
9 |
10 | WPGraphQL provides support for querying Themes in various ways.
11 |
12 | ### List of Themes
13 |
14 | Below is an example of querying a list of Themes.
15 |
16 | ```graphql
17 | {
18 | themes {
19 | nodes {
20 | id
21 | name
22 | version
23 | }
24 | }
25 | }
26 | ```
27 |
28 | **Query from Authenticated User**
29 |
30 | Authenticated users with the "edit_themes" capability can query a list of Themes and see all available themes for the site.
31 |
32 | 
33 |
34 | **Query from Public User**
35 |
36 | A public user or a user without "edit_themes" capability can make the same query and only the active theme will be returned.
37 |
38 | The active theme is considered a public entity in WordPress and can be publicly accessed and WPGraphQL respects this access control right.
39 |
40 | 
41 |
42 | ## Mutations
43 |
44 | > WPGraphQL does not currently support mutations for themes.
45 |
--------------------------------------------------------------------------------
/next-apollo/docs/upgrading.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | uri: "/docs/upgrading/"
3 | title: "Upgrading"
4 | ---
5 |
6 | It is recommended that anytime you want to update WPGraphQL that you get familiar with what's changed in the release.
7 |
8 | WPGraphQL publishes [release notes on Github](https://github.com/wp-graphql/wp-graphql/releases).
9 |
10 | WPGraphQL has been following Semver practices for a few years. We will continue to follow Semver and let version numbers communicate meaning. The summary of Semver versioning is as follows:
11 |
12 | - **MAJOR** version when you make incompatible API changes,
13 | - **MINOR** version when you add functionality in a backwards compatible manner, and
14 | - **PATCH** version when you make backwards compatible bug fixes.
15 |
16 | You can read more about the details of Semver at semver.org.
17 |
--------------------------------------------------------------------------------
/next-apollo/docs/use-with-php.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | uri: "/docs/use-with-php/"
3 | title: "Use with PHP"
4 | ---
5 |
6 | This document will be useful for users that want to use GraphQL within php files of their WordPress themes and plugins.
7 |
--------------------------------------------------------------------------------
/next-apollo/docs/using-data-from-custom-database-tables.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | uri: "/docs/using-data-from-custom-database-tables/"
3 | title: "Using Data from Custom Database Tables"
4 | ---
5 |
6 | This is an advanced guide that will be most useful for developers with experience with PHP and MySQL.
7 |
8 | ## Overview
9 |
10 | WordPress can do a lot of things with [Custom Post Types](/docs/custom-post-types/) and [Custom Taxonomies](/docs/custom-taxonomies/), but sometimes you need to use Custom Database Tables.
11 |
12 | In this guide, we will look into how to use data from Custom Database Tables with WPGraphQL.
13 |
14 | After reading this guide, you should be familiar with how WPGraphQL handles data and have a better understanding of WPGraphQL APIs to [register object types](/functions/register_graphql_object_type/), [register connections](/functions/register_graphql_connection/), create custom Data Loaders and custom Connection Resolvers.
15 |
16 | ## Thinking in Graphs
17 |
18 | WPGraphQL treats WordPress data like an application data graph. What that means, is that each post, page, term, comment, user or other object that can be uniquely identified is considered a "Node".
19 |
20 | Each Node can have properties. For example, a Post can have a Title, such as "Hello World"
21 |
22 | 
23 |
--------------------------------------------------------------------------------
/next-apollo/docs/widgets.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | uri: "/docs/widgets/"
3 | title: "Widgets"
4 | ---
5 |
6 | WPGraphQL currently does not support queries or mutations for widgets.
7 |
8 | Widgets don't have a proper server registry so it's difficult to provide formal WPGraphQL support for querying and/or mutating Widgets.
9 |
10 | [Read more about the decision not to officially support widgets](https://github.com/wp-graphql/wp-graphql/issues/20#issuecomment-554426933).
11 |
--------------------------------------------------------------------------------
/next-apollo/graphql.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | projects: {
3 | 'WPGraphQL': {
4 | schema: 'https://content.wpgraphql.com/graphql',
5 | }
6 | }
7 | }
--------------------------------------------------------------------------------
/next-apollo/hooks/useIsomorphicLayoutEffect.js:
--------------------------------------------------------------------------------
1 | import { useEffect, useLayoutEffect } from 'react'
2 |
3 | export const useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect
4 |
--------------------------------------------------------------------------------
/next-apollo/jsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "baseUrl": ".",
4 | "paths": {
5 | "@/*": ["src/*"]
6 | }
7 | }
8 | }
--------------------------------------------------------------------------------
/next-apollo/lib/helpers/flatListToHierarchical.js:
--------------------------------------------------------------------------------
1 | export const flatListToHierarchical = (
2 | data = [],
3 | { idKey = 'key', parentKey = 'parentId', childrenKey = 'children' } = {}
4 | ) => {
5 | const tree = []
6 | const childrenOf = {}
7 | data.forEach((item) => {
8 | const newItem = { ...item }
9 | const { [idKey]: id, [parentKey]: parentId = 0 } = newItem
10 | childrenOf[id] = childrenOf[id] || []
11 | newItem[childrenKey] = childrenOf[id]
12 | parentId
13 | ? (childrenOf[parentId] = childrenOf[parentId] || []).push(newItem)
14 | : tree.push(newItem)
15 | })
16 | return tree
17 | }
18 |
--------------------------------------------------------------------------------
/next-apollo/lib/mdx/components.js:
--------------------------------------------------------------------------------
1 | import Link from 'next/link'
2 | import clsx from 'clsx'
3 |
4 | export const Heading = ({ as, id, children, ...rest }) => {
5 | const Tag = as ?? 'h2'
6 | return (
7 |
8 | {children}
9 |
10 | )
11 | }
12 |
13 | export const LinkedHeading = ({ id, as, children, className }) => {
14 | if (id) {
15 | return (
16 |
24 | {children}
25 |
26 |
27 |
28 |
38 |
39 |
40 |
41 | )
42 | }
43 | return
44 | }
45 |
46 | export const components = {
47 | h2: (props) => ,
48 | h3: (props) => ,
49 | h4: (props) => ,
50 | h5: (props) => ,
51 | h6: (props) => ,
52 | _Heading: (props) => ,
53 | }
54 |
--------------------------------------------------------------------------------
/next-apollo/navs/README.md:
--------------------------------------------------------------------------------
1 | # Navs
2 |
3 | This directory is used to store statically defined navigation menus.
4 |
5 | Some navigation menus come from WordPress, but some (for MDX files) are defined in code.
6 |
--------------------------------------------------------------------------------
/next-apollo/netlify.toml:
--------------------------------------------------------------------------------
1 | package = "@netlify/plugin-nextjs"
--------------------------------------------------------------------------------
/next-apollo/next.config.js:
--------------------------------------------------------------------------------
1 | const withBundleAnalyzer = require('@next/bundle-analyzer')({
2 | enabled: process.env.ANALYZE === 'true',
3 | })
4 |
5 | /** @type {import('next').NextConfig} */
6 | const nextConfig = withBundleAnalyzer({
7 | swcMinify: true,
8 | experimental: {
9 | runtime: "nodejs"
10 | },
11 | // had to set this to false in order to get @headless-ui components to work.
12 | // @see: https://github.com/tailwindlabs/headlessui/issues/681#issuecomment-1086162507
13 | reactStrictMode: false,
14 | pageExtensions: ['ts', 'tsx', 'js', 'jsx', 'md', 'mdx'],
15 | images: {
16 | domains: [ 'secure.gravatar.com' ],
17 | disableStaticImages: true,
18 | },
19 | async redirects() {
20 | return require('./redirects.json')
21 | },
22 | webpack(config, options) {
23 | config.resolve.alias = {
24 | ...config.resolve.alias,
25 | // fixes next-mdx-remote: Package path ./jsx-runtime.js is not exported from package react
26 | // https://github.com/hashicorp/next-mdx-remote/issues/237
27 | "react/jsx-runtime.js": require.resolve("react/jsx-runtime"),
28 | };
29 | return config
30 | }
31 | })
32 |
33 | module.exports = nextConfig
34 |
--------------------------------------------------------------------------------
/next-apollo/pages/[...WordPressNode].js:
--------------------------------------------------------------------------------
1 | import { wordPressServerSideProps, WordPressNode } from 'wp-next'
2 | // import { gql } from '@apollo/client'
3 | //
4 | // Uncomment to override templates
5 | //
6 | // const templates = {
7 | // 'singular': {
8 | // query: gql`{ __typename }`,
9 | // component: props => {
10 | // return (
11 | // <>
12 | // This is my custom singular template
13 | // {JSON.stringify(props, null, 2)}
14 | // >
15 | // )
16 | // }
17 | // }
18 | // }
19 |
20 | const WordPressNodeTemplate = props => {
21 | return
22 | }
23 |
24 | export default WordPressNodeTemplate
25 |
26 | // use this for SSR instead of Static
27 | //
28 | // export async function getServerSideProps(context) {
29 | // return await wordPressServerSideProps(context)
30 | // }
31 |
32 | export async function getStaticProps(context) {
33 | return await wordPressServerSideProps(context)
34 | }
35 |
36 | export async function getStaticPaths() {
37 | return {
38 | paths: [],
39 | fallback: 'blocking'
40 | }
41 | }
--------------------------------------------------------------------------------
/next-apollo/pages/_app.js:
--------------------------------------------------------------------------------
1 | import { ApolloProvider } from '@apollo/client'
2 | import { useApollo } from '/lib/data/apollo'
3 |
4 | import '/styles/globals.css'
5 |
6 | function MyApp({ Component, pageProps }) {
7 | const apolloClient = useApollo(pageProps)
8 | return (
9 |
10 |
11 |
12 | )
13 | }
14 |
15 | export default MyApp
16 |
--------------------------------------------------------------------------------
/next-apollo/pages/api/hello.js:
--------------------------------------------------------------------------------
1 | // Next.js API route support: https://nextjs.org/docs/api-routes/introduction
2 |
3 | export default function handler(req, res) {
4 | res.status(200).json({ name: 'John Doe' })
5 | }
6 |
--------------------------------------------------------------------------------
/next-apollo/pages/developer-reference.js:
--------------------------------------------------------------------------------
1 | import SiteLayout from 'components/SiteLayout/SiteLayout'
2 | import SiteFooter from 'components/SiteFooter/SiteFooter'
3 |
4 | const DeveloperReference = () => {
5 | return (
6 |
7 |
8 |
Developer Reference
9 |
10 |
11 |
12 | )
13 | }
14 |
15 | export default DeveloperReference
16 |
--------------------------------------------------------------------------------
/next-apollo/pages/docs/[slug].js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { renderToString } from 'react-dom/server'
3 | import DocsLayout from '../../components/DocsLayout/DocsLayout'
4 |
5 | import { MDXRemote } from 'next-mdx-remote'
6 | import { getDoc, getDocData, getDocSlugs, getTableOfContents } from 'lib/helpers/parse-docs'
7 | import { components } from 'lib/mdx/components'
8 | import TableOfContents from 'components/TableOfContents/TableOfContents'
9 |
10 | const Doc = ({ source, toc, content }) => {
11 | return (
12 |
13 |
14 | {source?.frontmatter?.title && (
15 |
16 | {source.frontmatter.title}
17 |
18 | )}
19 |
20 |
21 |
22 |
30 |
31 | )
32 | }
33 |
34 | export default Doc
35 |
36 | export const getStaticProps = async ({ params }) => {
37 | const doc = await getDoc(params.slug)
38 | const source = doc
39 |
40 | return {
41 | props: {
42 | toc: getTableOfContents(renderToString( )),
43 | data: getDocData(params.slug),
44 | source,
45 | frontmatter: source.frontmatter,
46 | },
47 | revalidate: 30
48 | }
49 | }
50 |
51 | export const getStaticPaths = async () => {
52 | const paths = getDocSlugs().map((slug) => ({ params: { slug } }))
53 |
54 | return {
55 | paths,
56 | fallback: false,
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/next-apollo/pages/index.js:
--------------------------------------------------------------------------------
1 | import HomepageCta from '../components/HomepageCta/HomepageCta'
2 | import HomepageFeatures from '../components/HomepageFeatures/HomepageFeatures'
3 | import HomepageFrameworks from '../components/HomepageFrameworks/HomepageFrameworks'
4 | import HomepageHero from '../components/HomepageHero/HomepageHero'
5 | import HomePageTrust from '../components/HomepageTrust/HomepageTrust'
6 | import SiteLayout from '../components/SiteLayout/SiteLayout'
7 | import SiteFooter from '../components/SiteFooter/SiteFooter'
8 | import { NAV_QUERY } from 'components/SiteHeader/SiteHeader'
9 | import { initializeApollo, addApolloState } from 'lib/data/apollo'
10 |
11 | const Home = () => {
12 | return (
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | )
22 | }
23 |
24 | export default Home
25 |
26 | Home.layoutProps = {
27 | meta: {
28 | title: 'WPGraphQL - The GraphQL API for WordPress',
29 | },
30 | }
31 |
32 | export async function getStaticProps() {
33 | const apolloClient = initializeApollo()
34 |
35 | await apolloClient.query({
36 | query: NAV_QUERY,
37 | variables: { menu_name: 'Primary Nav' },
38 | })
39 |
40 | return addApolloState(apolloClient, {
41 | props: {},
42 | revalidate: 30
43 | })
44 | }
45 |
--------------------------------------------------------------------------------
/next-apollo/postcss.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: [
3 | 'postcss-import',
4 | 'tailwindcss/nesting',
5 | 'tailwindcss',
6 | 'postcss-focus-visible',
7 | 'autoprefixer',
8 | ],
9 | }
--------------------------------------------------------------------------------
/next-apollo/prettier.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | semi: false,
3 | singleQuote: true,
4 | printWidth: 100,
5 | trailingComma: 'es5',
6 | arrowParens: 'always',
7 | tabWidth: 2,
8 | useTabs: false,
9 | quoteProps: 'as-needed',
10 | jsxSingleQuote: false,
11 | bracketSpacing: true,
12 | bracketSameLine: false,
13 | }
--------------------------------------------------------------------------------
/next-apollo/public/application-data-graph.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/application-data-graph.png
--------------------------------------------------------------------------------
/next-apollo/public/categories-delete-not-allowed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/categories-delete-not-allowed.png
--------------------------------------------------------------------------------
/next-apollo/public/categories-delete-success.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/categories-delete-success.png
--------------------------------------------------------------------------------
/next-apollo/public/categories-mutation-create-not-allowed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/categories-mutation-create-not-allowed.png
--------------------------------------------------------------------------------
/next-apollo/public/categories-mutation-create-success.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/categories-mutation-create-success.png
--------------------------------------------------------------------------------
/next-apollo/public/categories-mutation-update-not-allowed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/categories-mutation-update-not-allowed.png
--------------------------------------------------------------------------------
/next-apollo/public/categories-mutation-update-success.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/categories-mutation-update-success.png
--------------------------------------------------------------------------------
/next-apollo/public/categories-query-by-global-id.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/categories-query-by-global-id.png
--------------------------------------------------------------------------------
/next-apollo/public/categories-query-edges-nodes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/categories-query-edges-nodes.png
--------------------------------------------------------------------------------
/next-apollo/public/categories-query-nodes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/categories-query-nodes.png
--------------------------------------------------------------------------------
/next-apollo/public/comments-mutation-closed-failure.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/comments-mutation-closed-failure.png
--------------------------------------------------------------------------------
/next-apollo/public/comments-mutation-delete-denied.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/comments-mutation-delete-denied.png
--------------------------------------------------------------------------------
/next-apollo/public/comments-mutation-delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/comments-mutation-delete.png
--------------------------------------------------------------------------------
/next-apollo/public/comments-mutation-duplicate-error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/comments-mutation-duplicate-error.png
--------------------------------------------------------------------------------
/next-apollo/public/comments-mutation-not-allowed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/comments-mutation-not-allowed.png
--------------------------------------------------------------------------------
/next-apollo/public/comments-mutation-public-user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/comments-mutation-public-user.png
--------------------------------------------------------------------------------
/next-apollo/public/comments-mutation-restore-not-allowed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/comments-mutation-restore-not-allowed.png
--------------------------------------------------------------------------------
/next-apollo/public/comments-mutation-restore-success.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/comments-mutation-restore-success.png
--------------------------------------------------------------------------------
/next-apollo/public/comments-mutation-success.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/comments-mutation-success.png
--------------------------------------------------------------------------------
/next-apollo/public/comments-query-post.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/comments-query-post.png
--------------------------------------------------------------------------------
/next-apollo/public/connections-graph.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/connections-graph.png
--------------------------------------------------------------------------------
/next-apollo/public/data-graph-category-term-connections.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/data-graph-category-term-connections.png
--------------------------------------------------------------------------------
/next-apollo/public/data-graph-category-terms-connection-complex.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/data-graph-category-terms-connection-complex.png
--------------------------------------------------------------------------------
/next-apollo/public/data-graph-category-terms.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/data-graph-category-terms.png
--------------------------------------------------------------------------------
/next-apollo/public/data-graph-hello-world.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/data-graph-hello-world.png
--------------------------------------------------------------------------------
/next-apollo/public/data-graph-query-filter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/data-graph-query-filter.png
--------------------------------------------------------------------------------
/next-apollo/public/debugging-graphql-query-logs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/debugging-graphql-query-logs.png
--------------------------------------------------------------------------------
/next-apollo/public/debugging-graphql-response.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/debugging-graphql-response.png
--------------------------------------------------------------------------------
/next-apollo/public/debugging-graphql-trace-log.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/debugging-graphql-trace-log.png
--------------------------------------------------------------------------------
/next-apollo/public/debugging-graphql-unexpected-token.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/debugging-graphql-unexpected-token.png
--------------------------------------------------------------------------------
/next-apollo/public/debugging-output-graphql-debug.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/debugging-output-graphql-debug.png
--------------------------------------------------------------------------------
/next-apollo/public/debugging-setting-enable-graphql-query-logs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/debugging-setting-enable-graphql-query-logs.png
--------------------------------------------------------------------------------
/next-apollo/public/debugging-setting-enable-graphql.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/debugging-setting-enable-graphql.png
--------------------------------------------------------------------------------
/next-apollo/public/debugging-setting-graphql-enable-tracing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/debugging-setting-graphql-enable-tracing.png
--------------------------------------------------------------------------------
/next-apollo/public/debugging-unexpected-token.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/debugging-unexpected-token.gif
--------------------------------------------------------------------------------
/next-apollo/public/extension-graphiql-explorer-custom-type.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/extension-graphiql-explorer-custom-type.png
--------------------------------------------------------------------------------
/next-apollo/public/extension-graphiql-explorer-search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/extension-graphiql-explorer-search.png
--------------------------------------------------------------------------------
/next-apollo/public/extension-query-custom-field.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/extension-query-custom-field.png
--------------------------------------------------------------------------------
/next-apollo/public/extension-query-custom-type.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/extension-query-custom-type.png
--------------------------------------------------------------------------------
/next-apollo/public/extension-wordpress-admin-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/extension-wordpress-admin-screen.png
--------------------------------------------------------------------------------
/next-apollo/public/extension-wordpress-plugin-dir.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/extension-wordpress-plugin-dir.png
--------------------------------------------------------------------------------
/next-apollo/public/extension-wordpress-plugin-filename.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/extension-wordpress-plugin-filename.png
--------------------------------------------------------------------------------
/next-apollo/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/favicon.ico
--------------------------------------------------------------------------------
/next-apollo/public/graphiql-auth-switch.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/graphiql-auth-switch.gif
--------------------------------------------------------------------------------
/next-apollo/public/graphiql-full-window-mode.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/graphiql-full-window-mode.gif
--------------------------------------------------------------------------------
/next-apollo/public/graphiql-ide-screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/graphiql-ide-screenshot.png
--------------------------------------------------------------------------------
/next-apollo/public/graphiql-query-composer.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/graphiql-query-composer.gif
--------------------------------------------------------------------------------
/next-apollo/public/graphiql-query-posts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/graphiql-query-posts.png
--------------------------------------------------------------------------------
/next-apollo/public/interacting-fetch-graphql-from-browser-console-1024x619.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/interacting-fetch-graphql-from-browser-console-1024x619.gif
--------------------------------------------------------------------------------
/next-apollo/public/interacting-wordpress-admin-graphiql.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/interacting-wordpress-admin-graphiql.png
--------------------------------------------------------------------------------
/next-apollo/public/intro-graphql-MenuItems.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/intro-graphql-MenuItems.gif
--------------------------------------------------------------------------------
/next-apollo/public/intro-graphql-fragments.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/intro-graphql-fragments.png
--------------------------------------------------------------------------------
/next-apollo/public/logo-wpgraphql.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/logo-wpgraphql.png
--------------------------------------------------------------------------------
/next-apollo/public/logos/logo-angular.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/logos/logo-angular.png
--------------------------------------------------------------------------------
/next-apollo/public/logos/logo-apollo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/logos/logo-apollo.png
--------------------------------------------------------------------------------
/next-apollo/public/logos/logo-credit-karma.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/logos/logo-credit-karma.png
--------------------------------------------------------------------------------
/next-apollo/public/logos/logo-dfuzr.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/logos/logo-dfuzr.png
--------------------------------------------------------------------------------
/next-apollo/public/logos/logo-ember.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/logos/logo-ember.png
--------------------------------------------------------------------------------
/next-apollo/public/logos/logo-funkhaus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/logos/logo-funkhaus.png
--------------------------------------------------------------------------------
/next-apollo/public/logos/logo-gatsby.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/logos/logo-gatsby.png
--------------------------------------------------------------------------------
/next-apollo/public/logos/logo-harness.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/logos/logo-harness.png
--------------------------------------------------------------------------------
/next-apollo/public/logos/logo-hope-lab.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/logos/logo-hope-lab.png
--------------------------------------------------------------------------------
/next-apollo/public/logos/logo-nevernull.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/logos/logo-nevernull.webp
--------------------------------------------------------------------------------
/next-apollo/public/logos/logo-nextjs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/logos/logo-nextjs.png
--------------------------------------------------------------------------------
/next-apollo/public/logos/logo-players-tribune.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/logos/logo-players-tribune.png
--------------------------------------------------------------------------------
/next-apollo/public/logos/logo-quartz.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/logos/logo-quartz.jpg
--------------------------------------------------------------------------------
/next-apollo/public/logos/logo-react.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/logos/logo-react.png
--------------------------------------------------------------------------------
/next-apollo/public/logos/logo-svelte.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/logos/logo-svelte.png
--------------------------------------------------------------------------------
/next-apollo/public/logos/logo-twincities.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/logos/logo-twincities.png
--------------------------------------------------------------------------------
/next-apollo/public/logos/logo-valu-digital.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/logos/logo-valu-digital.png
--------------------------------------------------------------------------------
/next-apollo/public/logos/logo-vue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/logos/logo-vue.png
--------------------------------------------------------------------------------
/next-apollo/public/logos/logo-webdev-studios.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/logos/logo-webdev-studios.png
--------------------------------------------------------------------------------
/next-apollo/public/logos/logo-zeek.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/next-apollo/public/logos/logo-zillow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/logos/logo-zillow.png
--------------------------------------------------------------------------------
/next-apollo/public/media-query-by-global-id.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/media-query-by-global-id.png
--------------------------------------------------------------------------------
/next-apollo/public/media-query-by-source-url.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/media-query-by-source-url.png
--------------------------------------------------------------------------------
/next-apollo/public/media-query-items.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/media-query-items.png
--------------------------------------------------------------------------------
/next-apollo/public/media-query-post-featured-image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/media-query-post-featured-image.png
--------------------------------------------------------------------------------
/next-apollo/public/menus-query-by-global-id.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/menus-query-by-global-id.png
--------------------------------------------------------------------------------
/next-apollo/public/menus-query-by-name.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/menus-query-by-name.png
--------------------------------------------------------------------------------
/next-apollo/public/menus-query-filter-location.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/menus-query-filter-location.png
--------------------------------------------------------------------------------
/next-apollo/public/menus-query-items.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/menus-query-items.png
--------------------------------------------------------------------------------
/next-apollo/public/plugins-query-authenticated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/plugins-query-authenticated.png
--------------------------------------------------------------------------------
/next-apollo/public/plugins-query-global-id.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/plugins-query-global-id.png
--------------------------------------------------------------------------------
/next-apollo/public/plugins-query-id-without-access.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/plugins-query-id-without-access.png
--------------------------------------------------------------------------------
/next-apollo/public/plugins-query-unauthenticated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/plugins-query-unauthenticated.png
--------------------------------------------------------------------------------
/next-apollo/public/posts-mutation-create-not-allowed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/posts-mutation-create-not-allowed.png
--------------------------------------------------------------------------------
/next-apollo/public/posts-mutation-create-success.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/posts-mutation-create-success.png
--------------------------------------------------------------------------------
/next-apollo/public/posts-mutation-delete-not-allowed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/posts-mutation-delete-not-allowed.png
--------------------------------------------------------------------------------
/next-apollo/public/posts-mutation-delete-success.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/posts-mutation-delete-success.png
--------------------------------------------------------------------------------
/next-apollo/public/posts-mutation-update-not-allowed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/posts-mutation-update-not-allowed.png
--------------------------------------------------------------------------------
/next-apollo/public/posts-mutation-update-success.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/posts-mutation-update-success.png
--------------------------------------------------------------------------------
/next-apollo/public/posts-query-by-database-id.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/posts-query-by-database-id.png
--------------------------------------------------------------------------------
/next-apollo/public/posts-query-by-global-id.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/posts-query-by-global-id.png
--------------------------------------------------------------------------------
/next-apollo/public/posts-query-by-slug.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/posts-query-by-slug.png
--------------------------------------------------------------------------------
/next-apollo/public/posts-query-by-uri.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/posts-query-by-uri.png
--------------------------------------------------------------------------------
/next-apollo/public/posts-query-edges-node.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/posts-query-edges-node.png
--------------------------------------------------------------------------------
/next-apollo/public/posts-query-filter-by-author.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/posts-query-filter-by-author.png
--------------------------------------------------------------------------------
/next-apollo/public/posts-query-filter-by-keyword.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/posts-query-filter-by-keyword.png
--------------------------------------------------------------------------------
/next-apollo/public/posts-query-filter-by-title.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/posts-query-filter-by-title.png
--------------------------------------------------------------------------------
/next-apollo/public/posts-query-nodes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/posts-query-nodes.png
--------------------------------------------------------------------------------
/next-apollo/public/query-multiple-root-resources.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/query-multiple-root-resources.png
--------------------------------------------------------------------------------
/next-apollo/public/query-posts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/query-posts.png
--------------------------------------------------------------------------------
/next-apollo/public/query-with-graphql.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/query-with-graphql.png
--------------------------------------------------------------------------------
/next-apollo/public/quick-graphiql-ide-wordpress.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/quick-graphiql-ide-wordpress.png
--------------------------------------------------------------------------------
/next-apollo/public/quick-graphiql-ide.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/quick-graphiql-ide.png
--------------------------------------------------------------------------------
/next-apollo/public/quick-graphiql-search-posts.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/quick-graphiql-search-posts.gif
--------------------------------------------------------------------------------
/next-apollo/public/quick-wp-graphql-first-query.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/quick-wp-graphql-first-query.gif
--------------------------------------------------------------------------------
/next-apollo/public/settings-mutation-authorized.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/settings-mutation-authorized.png
--------------------------------------------------------------------------------
/next-apollo/public/settings-mutation-not-authorized.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/settings-mutation-not-authorized.png
--------------------------------------------------------------------------------
/next-apollo/public/settings-wordpress-general-page-title.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/settings-wordpress-general-page-title.png
--------------------------------------------------------------------------------
/next-apollo/public/tags-query-by-name.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/tags-query-by-name.png
--------------------------------------------------------------------------------
/next-apollo/public/tags-query-by-uri.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/tags-query-by-uri.png
--------------------------------------------------------------------------------
/next-apollo/public/tags-query-nodes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/tags-query-nodes.png
--------------------------------------------------------------------------------
/next-apollo/public/testing-codeception-screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/testing-codeception-screenshot.png
--------------------------------------------------------------------------------
/next-apollo/public/themes-authenticated-user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/themes-authenticated-user.png
--------------------------------------------------------------------------------
/next-apollo/public/themes-not-authenticated-user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/themes-not-authenticated-user.png
--------------------------------------------------------------------------------
/next-apollo/public/users-create-success.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/users-create-success.png
--------------------------------------------------------------------------------
/next-apollo/public/users-create-user-unsuccessful.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/users-create-user-unsuccessful.png
--------------------------------------------------------------------------------
/next-apollo/public/users-delete-success.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/users-delete-success.png
--------------------------------------------------------------------------------
/next-apollo/public/users-delete-unsuccessful.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/users-delete-unsuccessful.png
--------------------------------------------------------------------------------
/next-apollo/public/users-mutation-register-disabled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/users-mutation-register-disabled.png
--------------------------------------------------------------------------------
/next-apollo/public/users-mutation-register-success.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/users-mutation-register-success.png
--------------------------------------------------------------------------------
/next-apollo/public/users-mutation-reset-password-invalid.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/users-mutation-reset-password-invalid.png
--------------------------------------------------------------------------------
/next-apollo/public/users-query-by-global-id.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/users-query-by-global-id.png
--------------------------------------------------------------------------------
/next-apollo/public/users-query.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/users-query.png
--------------------------------------------------------------------------------
/next-apollo/public/users-registration-email.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/users-registration-email.png
--------------------------------------------------------------------------------
/next-apollo/public/users-update-success.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/users-update-success.png
--------------------------------------------------------------------------------
/next-apollo/public/users-update-unsuccessful.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/users-update-unsuccessful.png
--------------------------------------------------------------------------------
/next-apollo/public/users-wordpress-new-password.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/users-wordpress-new-password.png
--------------------------------------------------------------------------------
/next-apollo/public/users-wordpress-reset-password.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/users-wordpress-reset-password.png
--------------------------------------------------------------------------------
/next-apollo/public/vercel.svg:
--------------------------------------------------------------------------------
1 |
3 |
4 |
--------------------------------------------------------------------------------
/next-apollo/public/wpgraphql-acf-search-schema.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/wpgraphql-acf-search-schema.gif
--------------------------------------------------------------------------------
/next-apollo/public/wpgraphql-nested-query.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/wpgraphql-nested-query.gif
--------------------------------------------------------------------------------
/next-apollo/public/wpgraphql-query-100-posts-graphql.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/wpgraphql-query-100-posts-graphql.png
--------------------------------------------------------------------------------
/next-apollo/public/wpgraphql-query-100-posts-rest.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/wpgraphql-query-100-posts-rest.png
--------------------------------------------------------------------------------
/next-apollo/public/wpgraphql-query-acf-flex.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/wpgraphql-query-acf-flex.gif
--------------------------------------------------------------------------------
/next-apollo/public/wpgraphql-query-batch-postman.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/wpgraphql-query-batch-postman.png
--------------------------------------------------------------------------------
/next-apollo/public/wpgraphql-query-github.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/wpgraphql-query-github.png
--------------------------------------------------------------------------------
/next-apollo/public/wpgraphql-query-multiple-resources.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/wpgraphql-query-multiple-resources.png
--------------------------------------------------------------------------------
/next-apollo/public/wpgraphql-query-types-fields.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/wpgraphql-query-types-fields.png
--------------------------------------------------------------------------------
/next-apollo/public/wpgraphql-wordpress-dashboard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/wpgraphql-wordpress-dashboard.png
--------------------------------------------------------------------------------
/next-apollo/public/wpgraphql-wordpress-rest-api-acf.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/public/wpgraphql-wordpress-rest-api-acf.png
--------------------------------------------------------------------------------
/next-apollo/redirects.json:
--------------------------------------------------------------------------------
1 | []
--------------------------------------------------------------------------------
/next-apollo/scripts/build-rss.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/next-apollo/scripts/build-rss.js
--------------------------------------------------------------------------------
/next-apollo/scripts/getPossibleTypes.js:
--------------------------------------------------------------------------------
1 | /**
2 | * This script is used to fetch the possible types for use in Apollo
3 | */
4 | const fetch = require('cross-fetch');
5 | const fs = require('fs');
6 |
7 | fetch(process.env.WPGRAPHQL_ENDPOINT ?? 'https://content.wpgraphql.com/graphql', {
8 | method: 'POST',
9 | headers: { 'Content-Type': 'application/json' },
10 | body: JSON.stringify({
11 | variables: {},
12 | query: `
13 | {
14 | __schema {
15 | types {
16 | kind
17 | name
18 | possibleTypes {
19 | name
20 | }
21 | }
22 | }
23 | }
24 | `,
25 | }),
26 | }).then(result => result.json())
27 | .then(result => {
28 | const possibleTypes = {};
29 |
30 | result.data.__schema.types.forEach(supertype => {
31 | if (supertype.possibleTypes) {
32 | possibleTypes[supertype.name] =
33 | supertype.possibleTypes.map(subtype => subtype.name);
34 | }
35 | });
36 |
37 | fs.writeFile('./possibleTypes.json', JSON.stringify(possibleTypes), err => {
38 | if (err) {
39 | console.error('Error writing possibleTypes.json', err);
40 | } else {
41 | console.log('Fragment types successfully extracted!');
42 | }
43 | });
44 | });
--------------------------------------------------------------------------------
/next-apollo/styles/globals.css:
--------------------------------------------------------------------------------
1 | @tailwind base;
2 |
3 | html {
4 | scroll-behavior: smooth;
5 | }
6 |
7 | @tailwind components;
8 | @tailwind utilities;
9 |
--------------------------------------------------------------------------------
/next-apollo/templates/Category/Category.js:
--------------------------------------------------------------------------------
1 | import { gql } from '@apollo/client'
2 | import PostPreview, { PostPreviewFragment } from 'components/PostPreview/PostPreview'
3 | import SiteLayout from 'components/SiteLayout/SiteLayout'
4 | import SiteFooter from 'components/SiteFooter/SiteFooter'
5 |
6 | const Category = {
7 | name: 'Category',
8 | }
9 |
10 | Category.variables = ({ id }) => ({
11 | id,
12 | })
13 |
14 | Category.query = gql`
15 | query GetCategory($id: ID!) {
16 | category(id: $id) {
17 | name
18 | description
19 | posts {
20 | nodes {
21 | ...PostPreview
22 | }
23 | }
24 | }
25 | }
26 | ${PostPreviewFragment}
27 | `
28 |
29 | Category.loading = () => {
30 | ;Loading...
31 | }
32 | Category.error = () => {
33 | ;Error...
34 | }
35 |
36 | Category.component = (props) => {
37 | const { data } = props
38 |
39 | if (!data) {
40 | return null
41 | }
42 |
43 | if (!data.category) {
44 | return null
45 | }
46 |
47 | const { category } = data
48 |
49 | return (
50 | <>
51 |
52 |
53 |
54 |
55 | Category: {category?.name ?? null}
56 |
57 |
58 | {category?.description ?? null}
59 |
60 |
61 |
62 | {category?.posts?.nodes?.map((post) => (
63 |
64 |
65 |
66 | ))}
67 |
68 |
69 |
70 |
71 | >
72 | )
73 | }
74 |
75 | export default Category
76 |
--------------------------------------------------------------------------------
/next-apollo/templates/Index/Index.js:
--------------------------------------------------------------------------------
1 | import { gql } from '@apollo/client'
2 |
3 | const Index = {
4 | name: 'Index',
5 | }
6 |
7 | Index.query = gql`
8 | {
9 | INDEX: __typename
10 | posts {
11 | nodes {
12 | id
13 | title
14 | author {
15 | node {
16 | name
17 | uri
18 | }
19 | }
20 | }
21 | }
22 | }
23 | `
24 |
25 | Index.component = (props) => (
26 | <>
27 | INDEX...
28 | {JSON.stringify(props, null, 2)}
29 | >
30 | )
31 |
32 | export default Index
33 |
--------------------------------------------------------------------------------
/next-apollo/wp-next/README.md:
--------------------------------------------------------------------------------
1 | # WP Next
2 |
3 | This is some abstractions for routing from a URI in Next to the proper node in WordPress, and landing at the proper template.
4 |
5 | This allows for a convention similar to the WordPress template hierarchy.
6 |
--------------------------------------------------------------------------------
/next-apollo/wp-next/index.js:
--------------------------------------------------------------------------------
1 | import { WordPressNode, wordPressServerSideProps } from "./template";
2 |
3 | export { wordPressServerSideProps, WordPressNode };
--------------------------------------------------------------------------------
/remix-run/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "extends": ["@remix-run/eslint-config", "@remix-run/eslint-config/node"]
3 | }
4 |
--------------------------------------------------------------------------------
/remix-run/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
3 | /.cache
4 | /build
5 | !/public
6 | /public/build
7 | .env
8 | api/index.js
--------------------------------------------------------------------------------
/remix-run/.nvmrc:
--------------------------------------------------------------------------------
1 | v14.19.0
--------------------------------------------------------------------------------
/remix-run/README.md:
--------------------------------------------------------------------------------
1 | # Welcome to Remix!
2 |
3 | - [Remix Docs](https://remix.run/docs)
4 |
5 | ## Development
6 |
7 | From your terminal:
8 |
9 | ```sh
10 | npm run dev
11 | ```
12 |
13 | This starts your app in development mode, rebuilding assets on file changes.
14 |
15 | ## Deployment
16 |
17 | First, build your app for production:
18 |
19 | ```sh
20 | npm run build
21 | ```
22 |
23 | Then run the app in production mode:
24 |
25 | ```sh
26 | npm start
27 | ```
28 |
29 | Now you'll need to pick a host to deploy it to.
30 |
31 | ### DIY
32 |
33 | If you're familiar with deploying node applications, the built-in Remix app server is production-ready.
34 |
35 | Make sure to deploy the output of `remix build`
36 |
37 | - `build/`
38 | - `public/build/`
39 |
40 | ### Using a Template
41 |
42 | When you ran `npx create-remix@latest` there were a few choices for hosting. You can run that again to create a new project, then copy over your `app/` folder to the new project that's pre-configured for your target server.
43 |
44 | ```sh
45 | cd ..
46 | # create a new project, and pick a pre-configured host
47 | npx create-remix@latest
48 | cd my-new-remix-app
49 | # remove the new project's app (not the old one!)
50 | rm -rf app
51 | # copy your app over
52 | cp -R ../my-old-remix-app/app app
53 | ```
54 |
--------------------------------------------------------------------------------
/remix-run/app/WordPressNode.jsx:
--------------------------------------------------------------------------------
1 | import { useQuery, gql } from '@apollo/client'
2 | import { getTemplateForSeedNode, SEED_QUERY } from '../wp-remix/template';
3 | import { initApollo } from './context/apollo'
4 | import { useLoaderData } from "@remix-run/react";
5 | import { json } from "@remix-run/server-runtime";
6 |
7 | const GET_POSTS = gql`
8 | {
9 | posts {
10 | nodes {
11 | id
12 | title
13 | }
14 | }
15 | }
16 | `
17 |
18 | export const loader = async (props) => {
19 | console.log( { props })
20 | const { params } = props
21 | const apolloClient = initApollo();
22 |
23 | const uri = params['*'] ?? null;
24 | if ( ! uri ) {
25 | return null;
26 | }
27 | const root = await apolloClient.query({ query: SEED_QUERY, variables: { uri } } );
28 |
29 | const rootNode = root.data.node ?? null
30 |
31 | if (!rootNode) {
32 | // we know we can't render the component
33 | // so throw immediately to stop executing code
34 | // and show the not found page
35 | throw new Response("Not Found", { status: 404 });
36 | }
37 |
38 | const template = getTemplateForSeedNode(rootNode);
39 | const { query, variables } = template;
40 | const { data } = await apolloClient.query({ query, variables });
41 |
42 | return json({
43 | uri,
44 | params,
45 | rootNode,
46 | pageData: data,
47 | })
48 | }
49 |
50 | const Index = (props) => {
51 |
52 | const loaded = useLoaderData();
53 | const { rootNode, pageData } = loaded;
54 |
55 | const template = getTemplateForSeedNode(rootNode);
56 | const { query, variables } = template;
57 | const Component = template.component ?? Fallback Template...
58 |
59 | const { data, loading, error } = useQuery(query, {
60 | variables,
61 | ssr: true
62 | })
63 |
64 | return
65 |
66 | }
67 |
68 | export default Index;
--------------------------------------------------------------------------------
/remix-run/app/context/apollo.js:
--------------------------------------------------------------------------------
1 | import { createContext } from 'react';
2 | import { ApolloClient, InMemoryCache, HttpLink } from '@apollo/client';
3 | import possibleTypes from '../../possibleTypes.json';
4 |
5 | const isBrowser = typeof window !== 'undefined';
6 | const initialState = isBrowser ? window.__APOLLO_STATE__ : {};
7 |
8 | export const initApollo = (ssrMode = true) => {
9 | return new ApolloClient({
10 | cache: new InMemoryCache({
11 | possibleTypes,
12 | typePolicies: {
13 | RootQuery: {
14 | queryType: true,
15 | },
16 | RootMutation: {
17 | mutationType: true,
18 | },
19 | }
20 | }).restore(initialState),
21 | link: new HttpLink({
22 | uri: 'https://content.wpgraphql.com/graphql'
23 | }),
24 | ssrMode
25 | });
26 | };
27 |
28 | export const ApolloContext = createContext(initialState);
29 | export const ApolloProvider = ApolloContext.Provider;
--------------------------------------------------------------------------------
/remix-run/app/entry.client.jsx:
--------------------------------------------------------------------------------
1 | import { RemixBrowser } from "@remix-run/react";
2 | import { hydrate } from "react-dom";
3 | import { initApollo } from "./context/apollo";
4 | import { ApolloProvider } from "@apollo/client";
5 |
6 | function Client(){
7 | const client = initApollo(false);
8 | return (
9 |
10 |
11 |
12 | )
13 | }
14 |
15 | hydrate( , document);
16 |
--------------------------------------------------------------------------------
/remix-run/app/entry.server.jsx:
--------------------------------------------------------------------------------
1 | import { RemixServer } from "@remix-run/react";
2 | import { renderToString } from "react-dom/server";
3 | import { ApolloContext, initApollo } from "./context/apollo";
4 | import { ApolloProvider } from "@apollo/client";
5 | import { getDataFromTree } from "@apollo/client/react/ssr";
6 |
7 | export default function handleRequest(
8 | request,
9 | responseStatusCode,
10 | responseHeaders,
11 | remixContext
12 | ) {
13 |
14 | const client = initApollo();
15 | const App = (
16 |
17 |
18 |
19 | )
20 |
21 | return getDataFromTree(App).then(() => {
22 |
23 | const initialState = client.extract();
24 |
25 | const markup = renderToString(
26 |
27 | {App}
28 |
29 | );
30 |
31 | responseHeaders.set("Content-Type", "text/html");
32 |
33 | return new Response("" + markup, {
34 | status: responseStatusCode,
35 | headers: responseHeaders,
36 | });
37 | });
38 |
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/remix-run/app/root.jsx:
--------------------------------------------------------------------------------
1 | import { useContext } from 'react';
2 | import {
3 | Links,
4 | LiveReload,
5 | Meta,
6 | Outlet,
7 | Scripts,
8 | ScrollRestoration,
9 | } from "@remix-run/react";
10 | import { ApolloContext } from "./context/apollo";
11 |
12 | export const meta = () => ({
13 | charset: "utf-8",
14 | title: "New Remix App",
15 | viewport: "width=device-width,initial-scale=1",
16 | });
17 |
18 | import styles from "./styles/app.css";
19 |
20 | export function links() {
21 | return [{ rel: "stylesheet", href: styles }]
22 | }
23 |
24 | export default function App() {
25 |
26 | // send the Apollo state to the client
27 | const initialState = useContext(ApolloContext);
28 |
29 | return (
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
45 |
46 |
47 | );
48 | }
49 |
--------------------------------------------------------------------------------
/remix-run/app/routes/$.jsx:
--------------------------------------------------------------------------------
1 | import { useQuery, gql } from '@apollo/client'
2 | import { getTemplateForSeedNode, SEED_QUERY } from '../../wp-remix/template';
3 | import { initApollo } from '../context/apollo'
4 | import { useLoaderData } from "@remix-run/react";
5 | import { json } from "@remix-run/server-runtime";
6 |
7 | const GET_POSTS = gql`
8 | {
9 | posts {
10 | nodes {
11 | id
12 | title
13 | }
14 | }
15 | }
16 | `
17 |
18 | export const loader = async (props) => {
19 | console.log( { props })
20 | const { params } = props
21 | const apolloClient = initApollo();
22 |
23 | const uri = params['*'] ?? null;
24 | if ( ! uri ) {
25 | return null;
26 | }
27 | const root = await apolloClient.query({ query: SEED_QUERY, variables: { uri } } );
28 |
29 | const rootNode = root.data.node ?? null
30 |
31 | if (!rootNode) {
32 | // we know we can't render the component
33 | // so throw immediately to stop executing code
34 | // and show the not found page
35 | throw new Response("Not Found", { status: 404 });
36 | }
37 |
38 | const template = getTemplateForSeedNode(rootNode);
39 | const { query, variables } = template;
40 | const { data } = await apolloClient.query({ query, variables });
41 |
42 | return json({
43 | uri,
44 | params,
45 | rootNode,
46 | pageData: data,
47 | })
48 | }
49 |
50 | const Index = (props) => {
51 |
52 | const loaded = useLoaderData();
53 | const { rootNode, pageData } = loaded;
54 |
55 | const template = getTemplateForSeedNode(rootNode);
56 | const { query, variables } = template;
57 | const Component = template.component ?? Fallback Template...
58 |
59 | const { data, loading, error } = useQuery(query, {
60 | variables,
61 | ssr: true
62 | })
63 |
64 | return
65 |
66 | }
67 |
68 | export default Index;
--------------------------------------------------------------------------------
/remix-run/app/routes/blog.jsx:
--------------------------------------------------------------------------------
1 | import { gql, useQuery } from '@apollo/client'
2 | import SiteLayout from 'components/SiteLayout/SiteLayout'
3 | import SiteFooter from 'components/SiteFooter/SiteFooter'
4 | import PostPreview, { PostPreviewFragment } from 'components/PostPreview/PostPreview'
5 | import { initializeApollo, addApolloState } from 'lib/data/apollo'
6 | import { useLoaderData } from "@remix-run/react";
7 | import { initApollo } from '../context/apollo'
8 |
9 | export const BLOG_QUERY = gql`
10 | query GetPostsForBlog($first: Int) {
11 | posts(first: $first) {
12 | nodes {
13 | ...PostPreview
14 | }
15 | }
16 | }
17 | ${PostPreviewFragment}
18 | `
19 |
20 | const Blog = () => {
21 |
22 | const { loading, error, data } = useQuery(BLOG_QUERY, {
23 | ssr: true,
24 | variables: {
25 | first: 100,
26 | },
27 | })
28 |
29 | if (loading) {
30 | return Loading...
31 | }
32 |
33 | if (error) {
34 | return Error: {error.message}
35 | }
36 |
37 | const { posts } = data
38 |
39 | return (
40 |
41 |
42 |
43 |
44 | Blog
45 |
46 |
47 | Read the latest posts from the WPGraphQL team
48 |
49 |
50 |
51 | {posts.nodes.map((post) => (
52 |
53 |
54 |
55 | ))}
56 |
57 |
58 |
59 |
60 | )
61 | }
62 |
63 | export default Blog
--------------------------------------------------------------------------------
/remix-run/app/routes/developer-reference.jsx:
--------------------------------------------------------------------------------
1 | import SiteLayout from '../../components/SiteLayout/SiteLayout'
2 | import SiteFooter from '../../components/SiteFooter/SiteFooter'
3 |
4 | const DeveloperReference = () => {
5 | return (
6 |
7 |
8 |
Developer Reference
9 |
10 |
11 |
12 | )
13 | }
14 |
15 | export default DeveloperReference
16 |
--------------------------------------------------------------------------------
/remix-run/app/routes/index.jsx:
--------------------------------------------------------------------------------
1 | import HomepageCta from '../../components/HomepageCta/HomepageCta'
2 | import HomepageFeatures from '../../components/HomepageFeatures/HomepageFeatures'
3 | import HomepageFrameworks from '../../components/HomepageFrameworks/HomepageFrameworks'
4 | import HomepageHero from '../../components/HomepageHero/HomepageHero'
5 | import HomePageTrust from '../../components/HomepageTrust/HomepageTrust'
6 | import SiteLayout from '../../components/SiteLayout/SiteLayout'
7 | import SiteFooter from '../../components/SiteFooter/SiteFooter'
8 |
9 | const Home = () => {
10 | return (
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | )
20 | }
21 |
22 | export default Home
23 |
24 | Home.layoutProps = {
25 | meta: {
26 | title: 'WPGraphQL - The GraphQL API for WordPress',
27 | },
28 | }
29 |
--------------------------------------------------------------------------------
/remix-run/components/DocsLayout/DocsLayout.js:
--------------------------------------------------------------------------------
1 | import DocsNav from 'components/DocsNav/DocsNav'
2 | import SiteLayout from 'components/SiteLayout/SiteLayout'
3 | import SiteFooter from 'components/SiteFooter/SiteFooter'
4 |
5 | const DocsLayout = ({ children }) => {
6 | return (
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | {children}
16 |
17 |
18 |
19 |
20 |
21 |
22 | )
23 | }
24 |
25 | export default DocsLayout
26 |
--------------------------------------------------------------------------------
/remix-run/components/DocsNav/DocsNav.js:
--------------------------------------------------------------------------------
1 | import { documentationNav } from '/navs/documentation.js'
2 | import { Link } from '@remix-run/react'
3 |
4 | const getNav = () => {
5 | return Object.keys(documentationNav).map((key, i) => {
6 | const children = documentationNav[key]
7 |
8 | if (children.length > 0) {
9 | return (
10 |
11 |
{key}
12 |
13 | {children.map((child, i) => {
14 | return (
15 |
16 |
17 | {child.title}
18 |
19 |
20 | )
21 | })}
22 |
23 |
24 | )
25 | }
26 |
27 | return null
28 | })
29 | }
30 |
31 | const DocsNav = () => {
32 | if (!documentationNav) {
33 | return null
34 | }
35 |
36 | return getNav()
37 | }
38 |
39 | export default DocsNav
40 |
--------------------------------------------------------------------------------
/remix-run/components/DynamicHeroIcon/DynamicHeroIcon.js:
--------------------------------------------------------------------------------
1 | import * as HIcons from '@heroicons/react/outline'
2 |
3 | /**
4 | * This component allows an icon to be rendered based on the name of the icon (i.e., string passed from a WordPress Nav Menu Item)
5 | * @see: https://github.com/tailwindlabs/heroicons/issues/278#issuecomment-851594776
6 | */
7 | const DynamicHeroIcon = (props) => {
8 | const { ...icons } = HIcons
9 | const TheIcon = icons[props.icon]
10 |
11 | return (
12 | <>
13 |
14 | >
15 | )
16 | }
17 |
18 | export default DynamicHeroIcon
19 |
--------------------------------------------------------------------------------
/remix-run/components/Heading/Heading.js:
--------------------------------------------------------------------------------
1 | const Heading = (props) => {
2 | return (
3 | <>
4 | Heading...
5 | {JSON.stringify(props, null, 2)}
6 | >
7 | )
8 | }
9 |
10 | export default Heading
11 |
--------------------------------------------------------------------------------
/remix-run/components/HomepageCta/HomepageCta.js:
--------------------------------------------------------------------------------
1 | import { Link } from '@remix-run/react'
2 |
3 | /* This example requires Tailwind CSS v2.0+ */
4 | const HomepageCta = () => {
5 | return (
6 |
27 | )
28 | }
29 |
30 | export default HomepageCta
31 |
--------------------------------------------------------------------------------
/remix-run/components/SiteLayout/SiteLayout.js:
--------------------------------------------------------------------------------
1 | import SiteHeader from '../SiteHeader/SiteHeader'
2 |
3 | const SiteLayout = ({ children }) => {
4 | return (
5 | <>
6 |
7 | {children}
8 | >
9 | )
10 | }
11 |
12 | export default SiteLayout
13 |
--------------------------------------------------------------------------------
/remix-run/components/SiteLogo/SiteLogo.js:
--------------------------------------------------------------------------------
1 |
2 | const SiteLogo = (props) => {
3 | return (
4 |
10 | )
11 | }
12 |
13 | export default SiteLogo
14 |
--------------------------------------------------------------------------------
/remix-run/components/TableOfContents/TableOfContents.js:
--------------------------------------------------------------------------------
1 | import { useState } from 'react'
2 | import { Link } from '@remix-run/react'
3 |
4 | const TableOfContents = ({ toc }) => {
5 | if (!toc || !toc.length) {
6 | return null
7 | }
8 |
9 | return (
10 |
11 |
12 | On this page
13 |
14 |
15 | {toc.map((item, index) => (
16 |
17 |
18 | {item.title}
19 |
20 |
21 | ))}
22 |
23 |
24 | )
25 | }
26 |
27 | export default TableOfContents
28 |
--------------------------------------------------------------------------------
/remix-run/hooks/useIsomorphicLayoutEffect.js:
--------------------------------------------------------------------------------
1 | import { useEffect, useLayoutEffect } from 'react'
2 |
3 | export const useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect
4 |
--------------------------------------------------------------------------------
/remix-run/jsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "include": ["remix.env.d.ts", "**/*.ts", "**/*.tsx"],
3 | "compilerOptions": {
4 | "lib": ["DOM", "DOM.Iterable", "ES2019"],
5 | "isolatedModules": true,
6 | "esModuleInterop": true,
7 | "jsx": "react-jsx",
8 | "moduleResolution": "node",
9 | "resolveJsonModule": true,
10 | "target": "ES2019",
11 | "strict": true,
12 | "baseUrl": ".",
13 | "paths": {
14 | "~/*": ["./app/*"]
15 | },
16 |
17 | // Remix takes care of building everything in `remix build`.
18 | "noEmit": true
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/remix-run/lib/helpers/flatListToHierarchical.js:
--------------------------------------------------------------------------------
1 | export const flatListToHierarchical = (
2 | data = [],
3 | { idKey = 'key', parentKey = 'parentId', childrenKey = 'children' } = {}
4 | ) => {
5 | const tree = []
6 | const childrenOf = {}
7 | data.forEach((item) => {
8 | const newItem = { ...item }
9 | const { [idKey]: id, [parentKey]: parentId = 0 } = newItem
10 | childrenOf[id] = childrenOf[id] || []
11 | newItem[childrenKey] = childrenOf[id]
12 | parentId
13 | ? (childrenOf[parentId] = childrenOf[parentId] || []).push(newItem)
14 | : tree.push(newItem)
15 | })
16 | return tree
17 | }
18 |
--------------------------------------------------------------------------------
/remix-run/lib/mdx/components.js:
--------------------------------------------------------------------------------
1 | import Link from 'next/link'
2 | import clsx from 'clsx'
3 |
4 | export const Heading = ({ as, id, children, ...rest }) => {
5 | const Tag = as ?? 'h2'
6 | return (
7 |
8 | {children}
9 |
10 | )
11 | }
12 |
13 | export const LinkedHeading = ({ id, as, children, className }) => {
14 | if (id) {
15 | return (
16 |
24 | {children}
25 |
26 |
27 |
28 |
38 |
39 |
40 |
41 | )
42 | }
43 | return
44 | }
45 |
46 | export const components = {
47 | h2: (props) => ,
48 | h3: (props) => ,
49 | h4: (props) => ,
50 | h5: (props) => ,
51 | h6: (props) => ,
52 | _Heading: (props) => ,
53 | }
54 |
--------------------------------------------------------------------------------
/remix-run/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "remix-template-remix",
3 | "private": true,
4 | "description": "",
5 | "license": "",
6 | "sideEffects": false,
7 | "scripts": {
8 | "build": "remix build",
9 | "build:css": "tailwindcss -m -i ./styles/app.css -o app/styles/app.css",
10 | "dev": "concurrently \"npm run dev:css\" \"remix dev\"",
11 | "prebuild": "npm run build:css && node ./scripts/getPossibleTypes.js",
12 | "predev": "node ./scripts/getPossibleTypes.js",
13 | "start": "remix-serve build",
14 | "dev:css": "tailwindcss -w -i ./styles/app.css -o app/styles/app.css"
15 | },
16 | "browserslist": [
17 | "> 1%"
18 | ],
19 | "dependencies": {
20 | "@apollo/client": "^3.5.10",
21 | "@headlessui/react": "^1.5.0",
22 | "@heroicons/react": "^1.0.6",
23 | "@remix-run/node": "^1.4.0",
24 | "@remix-run/react": "^1.4.0",
25 | "@remix-run/serve": "^1.4.0",
26 | "@remix-run/server-runtime": "^1.4.0",
27 | "@remix-run/vercel": "^1.4.0",
28 | "@tailwindcss/aspect-ratio": "^0.4.0",
29 | "@tailwindcss/typography": "^0.5.2",
30 | "@vercel/node": "^1.14.0",
31 | "clsx": "^1.1.1",
32 | "cross-fetch": "^3.1.5",
33 | "deepmerge": "^4.2.2",
34 | "graphql": "^16.3.0",
35 | "lodash": "^4.17.21",
36 | "react": "^17.0.2",
37 | "react-dom": "^17.0.2"
38 | },
39 | "devDependencies": {
40 | "@remix-run/dev": "^1.4.0",
41 | "@remix-run/eslint-config": "^1.4.0",
42 | "@remix-run/serve": "^1.4.0",
43 | "autoprefixer": "^10.4.4",
44 | "concurrently": "^7.1.0",
45 | "eslint": "^8.11.0",
46 | "postcss": "^8.4.12",
47 | "tailwindcss": "^3.0.24"
48 | },
49 | "engines": {
50 | "node": ">=14"
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/remix-run/public/application-data-graph.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/application-data-graph.png
--------------------------------------------------------------------------------
/remix-run/public/categories-delete-not-allowed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/categories-delete-not-allowed.png
--------------------------------------------------------------------------------
/remix-run/public/categories-delete-success.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/categories-delete-success.png
--------------------------------------------------------------------------------
/remix-run/public/categories-mutation-create-not-allowed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/categories-mutation-create-not-allowed.png
--------------------------------------------------------------------------------
/remix-run/public/categories-mutation-create-success.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/categories-mutation-create-success.png
--------------------------------------------------------------------------------
/remix-run/public/categories-mutation-update-not-allowed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/categories-mutation-update-not-allowed.png
--------------------------------------------------------------------------------
/remix-run/public/categories-mutation-update-success.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/categories-mutation-update-success.png
--------------------------------------------------------------------------------
/remix-run/public/categories-query-by-global-id.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/categories-query-by-global-id.png
--------------------------------------------------------------------------------
/remix-run/public/categories-query-edges-nodes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/categories-query-edges-nodes.png
--------------------------------------------------------------------------------
/remix-run/public/categories-query-nodes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/categories-query-nodes.png
--------------------------------------------------------------------------------
/remix-run/public/comments-mutation-closed-failure.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/comments-mutation-closed-failure.png
--------------------------------------------------------------------------------
/remix-run/public/comments-mutation-delete-denied.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/comments-mutation-delete-denied.png
--------------------------------------------------------------------------------
/remix-run/public/comments-mutation-delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/comments-mutation-delete.png
--------------------------------------------------------------------------------
/remix-run/public/comments-mutation-duplicate-error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/comments-mutation-duplicate-error.png
--------------------------------------------------------------------------------
/remix-run/public/comments-mutation-not-allowed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/comments-mutation-not-allowed.png
--------------------------------------------------------------------------------
/remix-run/public/comments-mutation-public-user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/comments-mutation-public-user.png
--------------------------------------------------------------------------------
/remix-run/public/comments-mutation-restore-not-allowed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/comments-mutation-restore-not-allowed.png
--------------------------------------------------------------------------------
/remix-run/public/comments-mutation-restore-success.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/comments-mutation-restore-success.png
--------------------------------------------------------------------------------
/remix-run/public/comments-mutation-success.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/comments-mutation-success.png
--------------------------------------------------------------------------------
/remix-run/public/comments-query-post.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/comments-query-post.png
--------------------------------------------------------------------------------
/remix-run/public/connections-graph.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/connections-graph.png
--------------------------------------------------------------------------------
/remix-run/public/data-graph-category-term-connections.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/data-graph-category-term-connections.png
--------------------------------------------------------------------------------
/remix-run/public/data-graph-category-terms-connection-complex.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/data-graph-category-terms-connection-complex.png
--------------------------------------------------------------------------------
/remix-run/public/data-graph-category-terms.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/data-graph-category-terms.png
--------------------------------------------------------------------------------
/remix-run/public/data-graph-hello-world.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/data-graph-hello-world.png
--------------------------------------------------------------------------------
/remix-run/public/data-graph-query-filter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/data-graph-query-filter.png
--------------------------------------------------------------------------------
/remix-run/public/debugging-graphql-query-logs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/debugging-graphql-query-logs.png
--------------------------------------------------------------------------------
/remix-run/public/debugging-graphql-response.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/debugging-graphql-response.png
--------------------------------------------------------------------------------
/remix-run/public/debugging-graphql-trace-log.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/debugging-graphql-trace-log.png
--------------------------------------------------------------------------------
/remix-run/public/debugging-graphql-unexpected-token.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/debugging-graphql-unexpected-token.png
--------------------------------------------------------------------------------
/remix-run/public/debugging-output-graphql-debug.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/debugging-output-graphql-debug.png
--------------------------------------------------------------------------------
/remix-run/public/debugging-setting-enable-graphql-query-logs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/debugging-setting-enable-graphql-query-logs.png
--------------------------------------------------------------------------------
/remix-run/public/debugging-setting-enable-graphql.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/debugging-setting-enable-graphql.png
--------------------------------------------------------------------------------
/remix-run/public/debugging-setting-graphql-enable-tracing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/debugging-setting-graphql-enable-tracing.png
--------------------------------------------------------------------------------
/remix-run/public/debugging-unexpected-token.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/debugging-unexpected-token.gif
--------------------------------------------------------------------------------
/remix-run/public/extension-graphiql-explorer-custom-type.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/extension-graphiql-explorer-custom-type.png
--------------------------------------------------------------------------------
/remix-run/public/extension-graphiql-explorer-search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/extension-graphiql-explorer-search.png
--------------------------------------------------------------------------------
/remix-run/public/extension-query-custom-field.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/extension-query-custom-field.png
--------------------------------------------------------------------------------
/remix-run/public/extension-query-custom-type.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/extension-query-custom-type.png
--------------------------------------------------------------------------------
/remix-run/public/extension-wordpress-admin-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/extension-wordpress-admin-screen.png
--------------------------------------------------------------------------------
/remix-run/public/extension-wordpress-plugin-dir.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/extension-wordpress-plugin-dir.png
--------------------------------------------------------------------------------
/remix-run/public/extension-wordpress-plugin-filename.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/extension-wordpress-plugin-filename.png
--------------------------------------------------------------------------------
/remix-run/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/favicon.ico
--------------------------------------------------------------------------------
/remix-run/public/graphiql-auth-switch.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/graphiql-auth-switch.gif
--------------------------------------------------------------------------------
/remix-run/public/graphiql-full-window-mode.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/graphiql-full-window-mode.gif
--------------------------------------------------------------------------------
/remix-run/public/graphiql-ide-screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/graphiql-ide-screenshot.png
--------------------------------------------------------------------------------
/remix-run/public/graphiql-query-composer.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/graphiql-query-composer.gif
--------------------------------------------------------------------------------
/remix-run/public/graphiql-query-posts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/graphiql-query-posts.png
--------------------------------------------------------------------------------
/remix-run/public/interacting-fetch-graphql-from-browser-console-1024x619.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/interacting-fetch-graphql-from-browser-console-1024x619.gif
--------------------------------------------------------------------------------
/remix-run/public/interacting-wordpress-admin-graphiql.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/interacting-wordpress-admin-graphiql.png
--------------------------------------------------------------------------------
/remix-run/public/intro-graphql-MenuItems.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/intro-graphql-MenuItems.gif
--------------------------------------------------------------------------------
/remix-run/public/intro-graphql-fragments.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/intro-graphql-fragments.png
--------------------------------------------------------------------------------
/remix-run/public/logo-wpgraphql.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/logo-wpgraphql.png
--------------------------------------------------------------------------------
/remix-run/public/logos/logo-angular.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/logos/logo-angular.png
--------------------------------------------------------------------------------
/remix-run/public/logos/logo-apollo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/logos/logo-apollo.png
--------------------------------------------------------------------------------
/remix-run/public/logos/logo-credit-karma.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/logos/logo-credit-karma.png
--------------------------------------------------------------------------------
/remix-run/public/logos/logo-dfuzr.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/logos/logo-dfuzr.png
--------------------------------------------------------------------------------
/remix-run/public/logos/logo-ember.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/logos/logo-ember.png
--------------------------------------------------------------------------------
/remix-run/public/logos/logo-funkhaus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/logos/logo-funkhaus.png
--------------------------------------------------------------------------------
/remix-run/public/logos/logo-gatsby.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/logos/logo-gatsby.png
--------------------------------------------------------------------------------
/remix-run/public/logos/logo-harness.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/logos/logo-harness.png
--------------------------------------------------------------------------------
/remix-run/public/logos/logo-hope-lab.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/logos/logo-hope-lab.png
--------------------------------------------------------------------------------
/remix-run/public/logos/logo-nevernull.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/logos/logo-nevernull.webp
--------------------------------------------------------------------------------
/remix-run/public/logos/logo-nextjs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/logos/logo-nextjs.png
--------------------------------------------------------------------------------
/remix-run/public/logos/logo-players-tribune.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/logos/logo-players-tribune.png
--------------------------------------------------------------------------------
/remix-run/public/logos/logo-quartz.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/logos/logo-quartz.jpg
--------------------------------------------------------------------------------
/remix-run/public/logos/logo-react.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/logos/logo-react.png
--------------------------------------------------------------------------------
/remix-run/public/logos/logo-svelte.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/logos/logo-svelte.png
--------------------------------------------------------------------------------
/remix-run/public/logos/logo-twincities.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/logos/logo-twincities.png
--------------------------------------------------------------------------------
/remix-run/public/logos/logo-valu-digital.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/logos/logo-valu-digital.png
--------------------------------------------------------------------------------
/remix-run/public/logos/logo-vue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/logos/logo-vue.png
--------------------------------------------------------------------------------
/remix-run/public/logos/logo-webdev-studios.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/logos/logo-webdev-studios.png
--------------------------------------------------------------------------------
/remix-run/public/logos/logo-zeek.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/remix-run/public/logos/logo-zillow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/logos/logo-zillow.png
--------------------------------------------------------------------------------
/remix-run/public/media-query-by-global-id.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/media-query-by-global-id.png
--------------------------------------------------------------------------------
/remix-run/public/media-query-by-source-url.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/media-query-by-source-url.png
--------------------------------------------------------------------------------
/remix-run/public/media-query-items.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/media-query-items.png
--------------------------------------------------------------------------------
/remix-run/public/media-query-post-featured-image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/media-query-post-featured-image.png
--------------------------------------------------------------------------------
/remix-run/public/menus-query-by-global-id.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/menus-query-by-global-id.png
--------------------------------------------------------------------------------
/remix-run/public/menus-query-by-name.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/menus-query-by-name.png
--------------------------------------------------------------------------------
/remix-run/public/menus-query-filter-location.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/menus-query-filter-location.png
--------------------------------------------------------------------------------
/remix-run/public/menus-query-items.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/menus-query-items.png
--------------------------------------------------------------------------------
/remix-run/public/plugins-query-authenticated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/plugins-query-authenticated.png
--------------------------------------------------------------------------------
/remix-run/public/plugins-query-global-id.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/plugins-query-global-id.png
--------------------------------------------------------------------------------
/remix-run/public/plugins-query-id-without-access.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/plugins-query-id-without-access.png
--------------------------------------------------------------------------------
/remix-run/public/plugins-query-unauthenticated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/plugins-query-unauthenticated.png
--------------------------------------------------------------------------------
/remix-run/public/posts-mutation-create-not-allowed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/posts-mutation-create-not-allowed.png
--------------------------------------------------------------------------------
/remix-run/public/posts-mutation-create-success.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/posts-mutation-create-success.png
--------------------------------------------------------------------------------
/remix-run/public/posts-mutation-delete-not-allowed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/posts-mutation-delete-not-allowed.png
--------------------------------------------------------------------------------
/remix-run/public/posts-mutation-delete-success.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/posts-mutation-delete-success.png
--------------------------------------------------------------------------------
/remix-run/public/posts-mutation-update-not-allowed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/posts-mutation-update-not-allowed.png
--------------------------------------------------------------------------------
/remix-run/public/posts-mutation-update-success.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/posts-mutation-update-success.png
--------------------------------------------------------------------------------
/remix-run/public/posts-query-by-database-id.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/posts-query-by-database-id.png
--------------------------------------------------------------------------------
/remix-run/public/posts-query-by-global-id.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/posts-query-by-global-id.png
--------------------------------------------------------------------------------
/remix-run/public/posts-query-by-slug.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/posts-query-by-slug.png
--------------------------------------------------------------------------------
/remix-run/public/posts-query-by-uri.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/posts-query-by-uri.png
--------------------------------------------------------------------------------
/remix-run/public/posts-query-edges-node.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/posts-query-edges-node.png
--------------------------------------------------------------------------------
/remix-run/public/posts-query-filter-by-author.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/posts-query-filter-by-author.png
--------------------------------------------------------------------------------
/remix-run/public/posts-query-filter-by-keyword.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/posts-query-filter-by-keyword.png
--------------------------------------------------------------------------------
/remix-run/public/posts-query-filter-by-title.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/posts-query-filter-by-title.png
--------------------------------------------------------------------------------
/remix-run/public/posts-query-nodes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/posts-query-nodes.png
--------------------------------------------------------------------------------
/remix-run/public/query-multiple-root-resources.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/query-multiple-root-resources.png
--------------------------------------------------------------------------------
/remix-run/public/query-posts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/query-posts.png
--------------------------------------------------------------------------------
/remix-run/public/query-with-graphql.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/query-with-graphql.png
--------------------------------------------------------------------------------
/remix-run/public/quick-graphiql-ide-wordpress.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/quick-graphiql-ide-wordpress.png
--------------------------------------------------------------------------------
/remix-run/public/quick-graphiql-ide.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/quick-graphiql-ide.png
--------------------------------------------------------------------------------
/remix-run/public/quick-graphiql-search-posts.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/quick-graphiql-search-posts.gif
--------------------------------------------------------------------------------
/remix-run/public/quick-wp-graphql-first-query.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/quick-wp-graphql-first-query.gif
--------------------------------------------------------------------------------
/remix-run/public/settings-mutation-authorized.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/settings-mutation-authorized.png
--------------------------------------------------------------------------------
/remix-run/public/settings-mutation-not-authorized.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/settings-mutation-not-authorized.png
--------------------------------------------------------------------------------
/remix-run/public/settings-wordpress-general-page-title.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/settings-wordpress-general-page-title.png
--------------------------------------------------------------------------------
/remix-run/public/tags-query-by-name.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/tags-query-by-name.png
--------------------------------------------------------------------------------
/remix-run/public/tags-query-by-uri.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/tags-query-by-uri.png
--------------------------------------------------------------------------------
/remix-run/public/tags-query-nodes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/tags-query-nodes.png
--------------------------------------------------------------------------------
/remix-run/public/testing-codeception-screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/testing-codeception-screenshot.png
--------------------------------------------------------------------------------
/remix-run/public/themes-authenticated-user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/themes-authenticated-user.png
--------------------------------------------------------------------------------
/remix-run/public/themes-not-authenticated-user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/themes-not-authenticated-user.png
--------------------------------------------------------------------------------
/remix-run/public/users-create-success.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/users-create-success.png
--------------------------------------------------------------------------------
/remix-run/public/users-create-user-unsuccessful.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/users-create-user-unsuccessful.png
--------------------------------------------------------------------------------
/remix-run/public/users-delete-success.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/users-delete-success.png
--------------------------------------------------------------------------------
/remix-run/public/users-delete-unsuccessful.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/users-delete-unsuccessful.png
--------------------------------------------------------------------------------
/remix-run/public/users-mutation-register-disabled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/users-mutation-register-disabled.png
--------------------------------------------------------------------------------
/remix-run/public/users-mutation-register-success.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/users-mutation-register-success.png
--------------------------------------------------------------------------------
/remix-run/public/users-mutation-reset-password-invalid.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/users-mutation-reset-password-invalid.png
--------------------------------------------------------------------------------
/remix-run/public/users-query-by-global-id.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/users-query-by-global-id.png
--------------------------------------------------------------------------------
/remix-run/public/users-query.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/users-query.png
--------------------------------------------------------------------------------
/remix-run/public/users-registration-email.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/users-registration-email.png
--------------------------------------------------------------------------------
/remix-run/public/users-update-success.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/users-update-success.png
--------------------------------------------------------------------------------
/remix-run/public/users-update-unsuccessful.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/users-update-unsuccessful.png
--------------------------------------------------------------------------------
/remix-run/public/users-wordpress-new-password.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/users-wordpress-new-password.png
--------------------------------------------------------------------------------
/remix-run/public/users-wordpress-reset-password.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/users-wordpress-reset-password.png
--------------------------------------------------------------------------------
/remix-run/public/vercel.svg:
--------------------------------------------------------------------------------
1 |
3 |
4 |
--------------------------------------------------------------------------------
/remix-run/public/wpgraphql-acf-search-schema.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/wpgraphql-acf-search-schema.gif
--------------------------------------------------------------------------------
/remix-run/public/wpgraphql-nested-query.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/wpgraphql-nested-query.gif
--------------------------------------------------------------------------------
/remix-run/public/wpgraphql-query-100-posts-graphql.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/wpgraphql-query-100-posts-graphql.png
--------------------------------------------------------------------------------
/remix-run/public/wpgraphql-query-100-posts-rest.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/wpgraphql-query-100-posts-rest.png
--------------------------------------------------------------------------------
/remix-run/public/wpgraphql-query-acf-flex.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/wpgraphql-query-acf-flex.gif
--------------------------------------------------------------------------------
/remix-run/public/wpgraphql-query-batch-postman.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/wpgraphql-query-batch-postman.png
--------------------------------------------------------------------------------
/remix-run/public/wpgraphql-query-github.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/wpgraphql-query-github.png
--------------------------------------------------------------------------------
/remix-run/public/wpgraphql-query-multiple-resources.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/wpgraphql-query-multiple-resources.png
--------------------------------------------------------------------------------
/remix-run/public/wpgraphql-query-types-fields.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/wpgraphql-query-types-fields.png
--------------------------------------------------------------------------------
/remix-run/public/wpgraphql-wordpress-dashboard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/wpgraphql-wordpress-dashboard.png
--------------------------------------------------------------------------------
/remix-run/public/wpgraphql-wordpress-rest-api-acf.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/public/wpgraphql-wordpress-rest-api-acf.png
--------------------------------------------------------------------------------
/remix-run/remix.config.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @type {import('@remix-run/dev').AppConfig}
3 | */
4 | module.exports = {
5 | serverBuildTarget: "vercel",
6 | // When running locally in development mode, we use the built in remix
7 | // server. This does not understand the vercel lambda module format,
8 | // so we default back to the standard build output.
9 | server: process.env.NODE_ENV === "development" ? undefined : "./server.js",
10 | ignoredRouteFiles: [".*"],
11 | // appDirectory: "app",
12 | // assetsBuildDirectory: "public/build",
13 | // serverBuildPath: "build/index.js",
14 | // publicPath: "/build/",
15 | };
16 |
--------------------------------------------------------------------------------
/remix-run/scripts/build-rss.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jasonbahl/headless-wp-template-hierarchy/1a489a4e2e40b62af454c0f76e3720b7871e78e7/remix-run/scripts/build-rss.js
--------------------------------------------------------------------------------
/remix-run/scripts/getPossibleTypes.js:
--------------------------------------------------------------------------------
1 | /**
2 | * This script is used to fetch the possible types for use in Apollo
3 | */
4 | const fetch = require('cross-fetch');
5 | const fs = require('fs');
6 |
7 | fetch(process.env.WPGRAPHQL_ENDPOINT ?? 'https://content.wpgraphql.com/graphql', {
8 | method: 'POST',
9 | headers: { 'Content-Type': 'application/json' },
10 | body: JSON.stringify({
11 | variables: {},
12 | query: `
13 | {
14 | __schema {
15 | types {
16 | kind
17 | name
18 | possibleTypes {
19 | name
20 | }
21 | }
22 | }
23 | }
24 | `,
25 | }),
26 | }).then(result => result.json())
27 | .then(result => {
28 | const possibleTypes = {};
29 |
30 | result.data.__schema.types.forEach(supertype => {
31 | if (supertype.possibleTypes) {
32 | possibleTypes[supertype.name] =
33 | supertype.possibleTypes.map(subtype => subtype.name);
34 | }
35 | });
36 |
37 | fs.writeFile('./possibleTypes.json', JSON.stringify(possibleTypes), err => {
38 | if (err) {
39 | console.error('Error writing possibleTypes.json', err);
40 | } else {
41 | console.log('Fragment types successfully extracted!');
42 | }
43 | });
44 | });
--------------------------------------------------------------------------------
/remix-run/server.js:
--------------------------------------------------------------------------------
1 | import { createRequestHandler } from "@remix-run/vercel";
2 | import * as build from "@remix-run/dev/server-build";
3 |
4 | export default createRequestHandler({ build, mode: process.env.NODE_ENV });
5 |
--------------------------------------------------------------------------------
/remix-run/styles/app.css:
--------------------------------------------------------------------------------
1 | @tailwind base;
2 |
3 | html {
4 | scroll-behavior: smooth;
5 | }
6 |
7 | @tailwind components;
8 | @tailwind utilities;
9 |
--------------------------------------------------------------------------------
/remix-run/templates/Archive/Archive.js:
--------------------------------------------------------------------------------
1 | import { gql } from '@apollo/client'
2 | import SiteLayout from 'components/SiteLayout/SiteLayout'
3 |
4 | const Archive = {
5 | name: 'Archive',
6 | }
7 |
8 | Archive.variables = ({ id }) => {
9 | return {
10 | id,
11 | }
12 | }
13 |
14 | Archive.query = gql`
15 | query GetContentType($id: ID!) {
16 | archive: contentType(id: $id) {
17 | __typename
18 | id
19 | uri
20 | name
21 | description
22 | graphqlPluralName
23 | contentNodes {
24 | nodes {
25 | __typename
26 | ... on ExtensionPlugin {
27 | id
28 | title
29 | uri
30 | content
31 | extensionFields {
32 | pluginHost
33 | pluginLink
34 | pluginReadmeLink
35 | }
36 | }
37 | }
38 | }
39 | }
40 | }
41 | `
42 |
43 | Archive.loading = () => {
44 | ;Loading...
45 | }
46 | Archive.error = () => {
47 | ;Error...
48 | }
49 | Archive.component = ({ data: { archive } }) => (
50 | <>
51 |
52 |
53 |
54 |
55 | {archive?.graphqlPluralName ?? 'Archive'}
56 |
57 |
58 | {archive?.description ?? null}
59 |
60 |
61 |
68 |
69 |
70 | >
71 | )
72 |
73 | export default Archive
74 |
--------------------------------------------------------------------------------
/remix-run/templates/Index/Index.js:
--------------------------------------------------------------------------------
1 | import { gql } from '@apollo/client'
2 |
3 | const Index = {
4 | name: 'Index',
5 | }
6 |
7 | Index.query = gql`
8 | {
9 | INDEX: __typename
10 | posts {
11 | nodes {
12 | id
13 | title
14 | author {
15 | node {
16 | name
17 | uri
18 | }
19 | }
20 | }
21 | }
22 | }
23 | `
24 |
25 | Index.component = (props) => (
26 | <>
27 | INDEX...
28 | {JSON.stringify(props, null, 2)}
29 | >
30 | )
31 |
32 | export default Index
33 |
--------------------------------------------------------------------------------
/remix-run/vercel.json:
--------------------------------------------------------------------------------
1 | {
2 | "build": {
3 | "env": {
4 | "ENABLE_FILE_SYSTEM_API": "1"
5 | }
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/remix-run/wp-remix/README.md:
--------------------------------------------------------------------------------
1 | # WP Next
2 |
3 | This is some abstractions for routing from a URI in Next to the proper node in WordPress, and landing at the proper template.
4 |
5 | This allows for a convention similar to the WordPress template hierarchy.
6 |
--------------------------------------------------------------------------------
/remix-run/wp-remix/index.js:
--------------------------------------------------------------------------------
1 | import { WordPressNode, wordPressServerSideProps } from "./template";
2 |
3 | export { wordPressServerSideProps, WordPressNode };
--------------------------------------------------------------------------------