import { gql } from 'graphql-request'
import fetchAPI from '@/lib/api/fetchAPI'

/**
 * Query the privacy policy page
 */
export async function getPriPolicyPage() {
  const data = await fetchAPI(
    gql`
      query getPriPolicy {
        page(id: "privacy-policy", idType: URI) {
          title
          content
          seo {
            fullHead
          }
          featuredImage {
            node {
              alt: altText
              imageUrl: sourceUrl
              placeholder: sourceUrl(size: THUMBNAIL)
            }
          }
        }
      }
    `
  )

  return data
}
