text: "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[288],{9667:function(e,t,n){var a=n(7294),o=n(457);t.Z=function(e){var t=e.title,n=e.rawMarkdownBody,r=e.pageContext;return a.createElement("section",{className:"inner-faq-content"},a.createElement("h2",null,t),a.createElement(o.Z,{pageContext:r},n))}},6776:function(e,t,n){n.r(t),n.d(t,{default:function(){return l}});var a=n(7294),o=n(5419),r=n(9667),l=function(e){var t,n,l,i,c=e.pageContext,u=e.data;t=(0,a.useState)(!1),n=t[0],l=t[1],i=function(e){Array.from(function(e,t){for(var n=[],a=e.nextElementSibling;a&&!a.matches(t);)n.push(a),a=a.nextElementSibling;return n}(e,"button")).map((function(e){return e.classList.toggle("show")}))},(0,a.useEffect)((function(){var e=window.location.hash?window.location.hash.split("#")[1]:"";if(e&&n){var t=document&&document.getElementById(e),a=t&&t.parentNode;a&&(a.parentNode.classList.toggle("open"),a.classList.toggle("open"),i(a.parentNode))}}),[n]),(0,a.useEffect)((function(){var e=document.querySelectorAll("h3");Array.from(e).forEach((function(e){var t,n=document.createElement("button");n.classList.add("faq-button-question"),null===(t=e.parentNode)||void 0===t||t.insertBefore(n,e),n.appendChild(e),l(!0)}))}),[]),(0,a.useEffect)((function(){var e=function(e){if("button"===e.target.localName||"h3"===e.target.localName){var t="button"===e.target.localName?e.target:e.target.parentNode;window.history.replaceState({},"","#"+e.target.getElementsByTagName("a")[0].id),window.history.scrollRestoration="manual","button"===e.target.localName?(e.target.classList.toggle("open"),e.target.getElementsByTagName("h3")[0].classList.toggle("open")):(e.target.classList.toggle("open"),e.target.parentNode.classList.toggle("open")),i(t)}};return document.addEventListener("click",e),function(){return document.removeEventListener("click",e)}}),["undefined"!=typeof window?window.location.hash:null]);var s=u.allMarkdownRemark.edges.map((function(e){return e.node})).sort((function(e,t){var n,a,o,r;return(null!==(n=null==e||null===(a=e.frontmatter)||void 0===a?void 0:a.position)&&void 0!==n?n:0)<(null!==(o=null==t||null===(r=t.frontmatter)||void 0===r?void 0:r.position)&&void 0!==o?o:0)?-1:1}));return a.createElement(o.Z,{title:"FAQ | GraphQL",pageContext:c},a.createElement("section",null,a.createElement("div",{className:"documentationContent"},a.createElement("section",{className:"inner-faq-content"},a.createElement("h1",null,"Frequently Asked Questions (FAQ)"),a.createElement("div",null,s.map((function(e,t){var n=e.frontmatter,o=(n=void 0===n?{}:n).title,l=e.rawMarkdownBody;return a.createElement(r.Z,{key:t,title:o,rawMarkdownBody:l,pageContext:c})})))))))}}}]);
  //# sourceMappingURL=component---src-pages-faq-tsx-ed7e57e159d32909bcc2.js.map