HeinrichTremblay/gatsby-source-iubenda-documents

Cannot query field "privacyPolicy" on type "IubendaDocument"

Closed this issue ยท 1 comments

Why doesn't the following work?

import { useStaticQuery, graphql } from "gatsby"
import React, { Fragment } from "react"

const PrivacyPolicySection = () => {

  //See: https://www.gatsbyjs.com/plugins/gatsby-source-iubenda-documents/?=privacy%20policy
  const data = useStaticQuery(graphql`
    query MyQuery {
      iubendaDocument {
        privacyPolicy
      }
    }
  `)

  return (
    <Fragment>
      <div dangerouslySetInnerHTML={{ __html: data.iubendaDocument.privacyPolicy }} />
    </Fragment>
  )
}

export default PrivacyPolicySection
<path>/src/components/privacy_policy_section.js
  10:9  error  Cannot query field "privacyPolicy" on type "IubendaDocument"  graphql/template-strings

This plugin doesn't appear to work out of the box. :(

I think this is why. I can't believe they make me pay just to trial the Service ๐Ÿ˜ 

๐Ÿ›‘ To access the Privacy Policy for<id> via API, convert it to Pro.
๐Ÿ‘€ Terms and Conditions for<id> not found.

Not your fault. Thanks for the plugin.