anacoelhovicente/wp-graphql-autodescription

Adds support for The Seo Framework to the WPGraphQL Schema

v1.0.1 2022-07-22 13:33 UTC

This package is auto-updated.

Last update: 2024-03-22 18:20:00 UTC


README

This plugin adds The Seo Framework support to WP GraphQL.

Supports:

  • Pages
  • Posts
  • Custom post types
  • Categories
  • Custom taxonomies
  • The Seo Framework Settings
    • Webmaster verification
    • Social settings
    • Schema Presence

Pre-req's

Using this plugin requires having the WPGraphQL and The Seo Framework (free or pro) installed and activated.

Activating

Activate the plugin like you would any other WordPress plugin.

Once the plugin is active, the seo argument will be available to any post object connectionQuery (posts, pages, custom post types, etc).

Usage

Post Type Data

query PostsSeo {
  posts(first: 10) {
    nodes {
      seo {
        title
        description
        canonical
        images {
          altText
          uri
          mediaDetails {
            height
            width
          }
        }
        opengraph {
          description
          title
          type
        }
        twitter {
          description
          title
        }
        metaRobotsNofollow
        metaRobotsNoarchive
        metaRobotsNoindex
        redirect
      }
    }
  }
}

Taxonomy Data

query CategoriesSeo {
  categories(first: 10) {
    nodes {
      seo {
        title
        description
        canonical
        images {
          altText
          uri
          mediaDetails {
            height
            width
          }
        }
        opengraph {
          description
          title
          type
        }
        twitter {
          description
          title
        }
        metaRobotsNofollow
        metaRobotsNoarchive
        metaRobotsNoindex
        redirect
      }
    }
  }
}

Settings Data

query SeoSettings {
  seoSettings {
    separator
    presence {
      logo
      name
      type
    }
    webmaster {
      baiduVerification
      googleVerification
      pinterestVerification
      yandexVerification
      bingVerification
    }
    social {
      facebook {
        appId
        authorFallback
        publisher
      }
      twitter {
        authorFallback
        cardType
        profile
      }
    }
  }
}