{"id":3917,"date":"2021-05-26T08:13:41","date_gmt":"2021-05-26T08:13:41","guid":{"rendered":"https:\/\/structured-data-for-wp.com\/docs\/?post_type=ht_kb&#038;p=3917"},"modified":"2021-05-26T09:48:21","modified_gmt":"2021-05-26T09:48:21","slug":"how-to-add-schema-structured-data-for-wp-amp-support-for-wpgraphql","status":"publish","type":"ht_kb","link":"https:\/\/structured-data-for-wp.com\/docs\/article\/how-to-add-schema-structured-data-for-wp-amp-support-for-wpgraphql\/","title":{"rendered":"How to add Schema &#038; Structured Data for WP &#038; AMP Support for WPGraphQL"},"content":{"rendered":"\n<p>Now we are providing WPGraphQL support by Schema &amp; Structured Data for WP &amp; AMP. You can query your schema data inside the GraphQL query, you can get the data from here.<\/p>\n\n\n\n<p>For this two plugin must be activated  <a href=\"https:\/\/wordpress.org\/plugins\/schema-and-structured-data-for-wp\/\">Schema &amp; Structured Data for WP &amp; AMP<\/a> and <a href=\"https:\/\/wordpress.org\/plugins\/wp-graphql\/\">WPGraphQL<\/a><\/p>\n\n\n\n<p>Once both the plugin activated the object will there. Select <strong>saswpSchema<\/strong> <strong>json id<\/strong> like below the screenshot.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"400\" src=\"https:\/\/structured-data-for-wp.com\/docs\/wp-content\/uploads\/2021\/05\/14-1024x400.png\" alt=\"\" class=\"wp-image-3925\" srcset=\"https:\/\/structured-data-for-wp.com\/docs\/wp-content\/uploads\/2021\/05\/14-1024x400.png 1024w, https:\/\/structured-data-for-wp.com\/docs\/wp-content\/uploads\/2021\/05\/14-300x117.png 300w, https:\/\/structured-data-for-wp.com\/docs\/wp-content\/uploads\/2021\/05\/14-768x300.png 768w, https:\/\/structured-data-for-wp.com\/docs\/wp-content\/uploads\/2021\/05\/14-50x20.png 50w, https:\/\/structured-data-for-wp.com\/docs\/wp-content\/uploads\/2021\/05\/14-60x23.png 60w, https:\/\/structured-data-for-wp.com\/docs\/wp-content\/uploads\/2021\/05\/14-100x39.png 100w, https:\/\/structured-data-for-wp.com\/docs\/wp-content\/uploads\/2021\/05\/14.png 1345w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>Currently returning Schema data for:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Pages<\/li><li>Posts<\/li><li>Custom post types<\/li><li>Products (WooCommerce)<\/li><li>Categories<\/li><\/ul>\n\n\n\n<p><strong>To query for the Schema Data simply add the saswpSchema object to your query:<\/strong><\/p>\n\n\n\n<p>Post Type Data<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>query GetPages {\r\n    pages(first: 10) {\r\n        edges {\r\n            node {\r\n                id\r\n                title\r\n                seo {\r\n                    canonical\r\n                    title\r\n                    metaDesc\r\n                    focuskw\r\n                    metaRobotsNoindex\r\n                    metaRobotsNofollow\r\n                    opengraphAuthor\r\n                    opengraphDescription\r\n                    opengraphTitle\r\n                    opengraphDescription\r\n                    opengraphImage {\r\n                        altText\r\n                        sourceUrl\r\n                        srcSet\r\n                    }\r\n                    opengraphUrl\r\n                    opengraphSiteName\r\n                    opengraphPublishedTime\r\n                    opengraphModifiedTime\r\n                    twitterTitle\r\n                    twitterDescription\r\n                    twitterImage {\r\n                        altText\r\n                        sourceUrl\r\n                        srcSet\r\n                    }\r\n                    breadcrumbs {\r\n                        url\r\n                        text\r\n                    }\r\n                    cornerstone\r\n                    schema {\r\n                        pageType\r\n                        articleType\r\n                        raw\r\n                    }\r\n                    readingTime\r\n                    fullHead\r\n                }\r\n                author {\r\n                    node {\r\n                        seo {\r\n                            metaDesc\r\n                            metaRobotsNofollow\r\n                            metaRobotsNoindex\r\n                            title\r\n                            social {\r\n                                youTube\r\n                                wikipedia\r\n                                twitter\r\n                                soundCloud\r\n                                pinterest\r\n                                mySpace\r\n                                linkedIn\r\n                                instagram\r\n                                facebook\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\n<\/code><\/pre>\n\n\n\n<p><strong>That\u2019s it for this tutorial!<\/strong><\/p>\n\n\n\n<p><strong>We hope we\u2019ve clear your doubts in case If you have any feedback or questions,&nbsp;<\/strong><strong>Just contact us&nbsp;<a href=\"http:\/\/structured-data-for-wp.com\/contact-us\/\">here<\/a>&nbsp;and we are always available for you.<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Now we are providing WPGraphQL support by Schema &amp; Structured Data for WP &amp; AMP. You can query your schema data inside the GraphQL query, you can get the data from here. For this two plugin must be activated Schema &amp; Structured Data for WP &amp; AMP and WPGraphQL Once&#8230;<\/p>\n","protected":false},"author":3,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[3],"ht-kb-tag":[],"class_list":["post-3917","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-how-to"],"_links":{"self":[{"href":"https:\/\/structured-data-for-wp.com\/docs\/wp-json\/wp\/v2\/ht-kb\/3917","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/structured-data-for-wp.com\/docs\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/structured-data-for-wp.com\/docs\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/structured-data-for-wp.com\/docs\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/structured-data-for-wp.com\/docs\/wp-json\/wp\/v2\/comments?post=3917"}],"version-history":[{"count":8,"href":"https:\/\/structured-data-for-wp.com\/docs\/wp-json\/wp\/v2\/ht-kb\/3917\/revisions"}],"predecessor-version":[{"id":3927,"href":"https:\/\/structured-data-for-wp.com\/docs\/wp-json\/wp\/v2\/ht-kb\/3917\/revisions\/3927"}],"wp:attachment":[{"href":"https:\/\/structured-data-for-wp.com\/docs\/wp-json\/wp\/v2\/media?parent=3917"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/structured-data-for-wp.com\/docs\/wp-json\/wp\/v2\/ht-kb-category?post=3917"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/structured-data-for-wp.com\/docs\/wp-json\/wp\/v2\/ht-kb-tag?post=3917"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}