{"_id":"@eknowles/gatsby-source-prismic-graphql","_rev":"4-a9cfa5caa92c86fb8e197c6caedd2c4d","name":"@eknowles/gatsby-source-prismic-graphql","dist-tags":{"latest":"4.0.1"},"versions":{"3.3.0":{"private":false,"name":"@eknowles/gatsby-source-prismic-graphql","description":"Source data from Prismic with GraphQL","license":"MIT","author":{"name":"Birkir Gudjonsson","email":"birkir.gudjonsson@gmail.com"},"homepage":"https://github.com/birkir/gatsby-source-prismic-graphql#readme","repository":{"type":"git","url":"git+https://github.com/birkir/gatsby-source-prismic-graphql.git"},"bugs":{"url":"https://github.com/birkir/gatsby-source-prismic-graphql/issues"},"version":"3.3.0","main":"index.js","scripts":{"build":"tsc --emitDeclarationOnly && babel src --out-dir ./ --extensions '.ts,.tsx'","clean":"rimraf {interfaces,types,components,utils,*.js}","prepare":"yarn clean && cross-env NODE_ENV=production yarn build","start":"babel src --out-dir ./ --extensions '.ts,.tsx' --watch"},"types":"./types/index.d.ts","dependencies":{"apollo-boost":"^0.3.1","apollo-link-context":"^1.0.17","gatsby-image":"^2.2.4","gatsby-source-filesystem":"^2.1.2","gatsby-source-graphql":"^2.0.15","gatsby-source-graphql-universal":"^3.1.3","path-to-regexp":"^3.0.0","prismic-javascript":"^2.0.1","styled-components":"^4.1.3","traverse":"^0.6.6","url-pattern":"^1.0.3"},"peerDependencies":{"gatsby":">2.0.0-alpha","react":"^16.0.0"},"devDependencies":{"@babel/cli":"7.2.3","@babel/core":"7.3.3","@babel/plugin-proposal-class-properties":"7.3.3","@babel/plugin-proposal-object-rest-spread":"7.3.2","@babel/plugin-transform-runtime":"7.2.0","@babel/preset-env":"7.3.1","@babel/preset-react":"7.0.0","@babel/preset-typescript":"7.3.3","@babel/runtime":"7.3.1","@types/lodash":"4.14.121","@types/node":"11.9.4","@types/node-fetch":"2.1.6","@types/react":"16.8.4","@types/styled-components":"^4.1.12","@types/traverse":"^0.6.32","cross-env":"^5.2.0","gatsby":"^2.13.9","prettier":"^1.16.4"},"keywords":["gatsby","gatsby-plugin","graphql","preview","prismic"],"_id":"@eknowles/gatsby-source-prismic-graphql@3.3.0","_nodeVersion":"10.16.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-Rvzx80osRs5Kux+A9tfIFY1vl08p8XL5QU8eou/oi9OfP6YiRk1wsXVa7vDeykJ5kAMoo01C0x1CoJlQgkDGEw==","shasum":"7c4b3c302a34c69bf2412ff0a8fffb8bcabcc1f0","tarball":"https://registry.npmjs.org/@eknowles/gatsby-source-prismic-graphql/-/gatsby-source-prismic-graphql-3.3.0.tgz","fileCount":40,"unpackedSize":66113,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdLCyVCRA9TVsSAnZWagAAhGQP/A0GoAymeml4RnyFK9lf\nkS9AmtWbs73iWKoC8rO4jQj+hOhp7O5PDn6e0kyzugbN1DgzmeF1KiUROnJv\nQJCxbIJXQXuCSr70TTRSmMLXOHVIciPyI/wsXV/ItKgsPmf7zJQfezMIi1eN\naNbNTHsQoMsOinuONV3YyW78w8Jq+K6AEvulU6sDfDFhYUxvn9HL8m2pOOPs\n8W0gkI214Zp/o5/NM2B24ZzqkPW6zwnfqJ46tyLvmvp21sfdFpagRLJPo8rv\nGv3dkdyRZQW/VNa7y+iJ5WC4BgbwS48OVy/SXC9AtZC5QW0iotR+OatftJ3k\nFOt76lhxzFV96YCQKypkpIQCWuR4nnCfom43YlFYggAcERr28hbBqbnCtJVa\nZX+vLlAjNBPPm3ekJnBzXzruuy+66/6MY7JHuJKxINQlhJaiL0SkKSe8r4/k\ntUD7mpGfZKBp+Nz0aE6kjV1RXP0E8eSzOVdT7lTa+jKDwcCNE1Hpd+SCTkFl\nvm0Jws/EdKzi2Zud7w76nf6Pj6OFwsOUBqya/zuAEVzsxcr0mqBVuLWe6qOJ\nXZoBHvc88DQo1CPf1QVCLoT4oHSacfnMptK5l9j9TYgipToGs+A2PC+QPT+B\nwVSdfhUJsA2IQ1JrPF/yBd6q+uCxWZ7inXPAkSWecYtQT8GXwPvCB3ngsASM\nfBO/\r\n=zk8M\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFomhGl5VATm3sY8mOGReuFbyJN9mLHkLFry6gUNr6jOAiBiu6+pmSFR+EP7usq7D7id9RQ2n0CF8vJjw833IyZtHg=="}]},"maintainers":[{"name":"eknowles","email":"mail@eknowles.com"}],"_npmUser":{"name":"eknowles","email":"mail@eknowles.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gatsby-source-prismic-graphql_3.3.0_1563176085395_0.30596899789404963"},"_hasShrinkwrap":false},"3.3.1":{"private":false,"name":"@eknowles/gatsby-source-prismic-graphql","description":"Source data from Prismic with GraphQL","license":"MIT","author":{"name":"Birkir Gudjonsson","email":"birkir.gudjonsson@gmail.com"},"homepage":"https://github.com/birkir/gatsby-source-prismic-graphql#readme","repository":{"type":"git","url":"git+https://github.com/birkir/gatsby-source-prismic-graphql.git"},"bugs":{"url":"https://github.com/birkir/gatsby-source-prismic-graphql/issues"},"version":"3.3.1","main":"index.js","scripts":{"build":"tsc --emitDeclarationOnly && babel src --out-dir ./ --extensions '.ts,.tsx'","clean":"rimraf {interfaces,types,components,utils,*.js}","prepare":"yarn clean && cross-env NODE_ENV=production yarn build","start":"babel src --out-dir ./ --extensions '.ts,.tsx' --watch"},"types":"./types/index.d.ts","dependencies":{"apollo-boost":"^0.4.3","apollo-link-context":"^1.0.18","gatsby-image":"^2.2.6","gatsby-source-filesystem":"^2.1.5","gatsby-source-graphql":"^2.1.2","gatsby-source-graphql-universal":"^3.1.3","path-to-regexp":"^3.0.0","prismic-javascript":"^2.0.3","styled-components":"^4.1.3","traverse":"^0.6.6","url-pattern":"^1.0.3"},"peerDependencies":{"gatsby":">2.0.0-alpha","react":"^16.0.0"},"devDependencies":{"@babel/cli":"7.2.3","@babel/core":"7.3.3","@babel/plugin-proposal-class-properties":"7.3.3","@babel/plugin-proposal-object-rest-spread":"7.3.2","@babel/plugin-transform-runtime":"7.2.0","@babel/preset-env":"7.3.1","@babel/preset-react":"7.0.0","@babel/preset-typescript":"7.3.3","@babel/runtime":"7.3.1","@types/lodash":"4.14.121","@types/node":"11.9.4","@types/node-fetch":"2.1.6","@types/react":"16.8.4","@types/styled-components":"^4.1.12","@types/traverse":"^0.6.32","cross-env":"^5.2.0","gatsby":"^2.13.9","prettier":"^1.16.4"},"keywords":["gatsby","gatsby-plugin","graphql","preview","prismic"],"gitHead":"1c487090d5e4045c49f2fc07549b17826e727715","_id":"@eknowles/gatsby-source-prismic-graphql@3.3.1","_nodeVersion":"10.16.0","_npmVersion":"lerna/3.15.0/node@v10.16.0+x64 (darwin)","dist":{"integrity":"sha512-oIl/448mPZU4LQfKQc2ZETnq+lV1PuUYSM1JIqSaz16mx/xoAleuYcni71Ufj1PGodjCEBNXgDIUUyelU2kNog==","shasum":"cec7989a7fbb3e36da650fd8062a6bf722242abc","tarball":"https://registry.npmjs.org/@eknowles/gatsby-source-prismic-graphql/-/gatsby-source-prismic-graphql-3.3.1.tgz","fileCount":41,"unpackedSize":67638,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdMW87CRA9TVsSAnZWagAAovUP/3rty4yzBzXMK3rB7hDl\nnHYOYDPeQapDkMTINhwBp9vSQLzkkoxWSTMGB6HSetyjw7tRAy3UlKtjwZ/8\n3rPQN3Wo00qalJeg2YSdzsdf64E0L+36hDtoZ7/f877WjPQYFZ/DEmOuzzCk\nYhDTYlrJVQTmWC0/8o8cXTpgdDt8hZfsQtaMXKxWP6fMeEqaHA0H1sX4DWjo\nKLYW2RdfVDt3GZNmDGACNMLHaX/TOtUyK/qKLSUurpFu5Ib2H6vs1d4lobCx\np1ZkKFcKrx8s4CpLSmJG2NL8PV3E65VBQtszoATk3HNDIRWqqzHp93OCn2KQ\nZMUPQG1LINjcyMHj0Xe6QeXWU8U4TN/YmfkyTsPUHPveNtuIG8zrIWCnz22F\n+VSiu6VBKry3vKcaEMmtN+dVzrfHcimEzRwb1rsojVxqDxVD1OKlirTnpmXC\nQCA4GcyVM1CoRyUi+xhPvriT0FEiQu0I+l/CTqTiidSAreF0cjVhq6GzyRNz\nTw4aLBAExic0VmA4e5DqQAHTfWem2e3LCLWY3KNeKI6t2sZcgWH7YWcKMET/\nJSxfGE040uQ7m1+yIDs8b9O0lIHXeK1iVBZtuJKwefAhswkvwEuXeoR2Dcnz\nAooy+jT3LUUx6TXKQ/yCCZKg/uua7H7wFpcHidSLhyq2sE2mwqq8tatYjr+I\n46Oq\r\n=fBkd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHd03zskqbiOgC4ZOPXI6BeTKuBxxyWmwW2ASj6vzUvbAiBK1nPXthFQheD/0f6KAF9x0VX5WeLVBAt9T34HeAccLA=="}]},"maintainers":[{"name":"eknowles","email":"mail@eknowles.com"}],"_npmUser":{"name":"eknowles","email":"mail@eknowles.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gatsby-source-prismic-graphql_3.3.1_1563520826940_0.746499903913904"},"_hasShrinkwrap":false},"3.3.2":{"private":false,"name":"@eknowles/gatsby-source-prismic-graphql","description":"Source data from Prismic with GraphQL","license":"MIT","author":{"name":"Birkir Gudjonsson","email":"birkir.gudjonsson@gmail.com"},"homepage":"https://github.com/birkir/gatsby-source-prismic-graphql#readme","repository":{"type":"git","url":"git+https://github.com/birkir/gatsby-source-prismic-graphql.git"},"bugs":{"url":"https://github.com/birkir/gatsby-source-prismic-graphql/issues"},"version":"3.3.2","main":"index.js","scripts":{"build":"tsc --emitDeclarationOnly && babel src --out-dir ./ --extensions '.ts,.tsx'","clean":"rimraf {interfaces,types,components,utils,*.js}","prepare":"yarn clean && cross-env NODE_ENV=production yarn build","start":"babel src --out-dir ./ --extensions '.ts,.tsx' --watch"},"types":"./types/index.d.ts","dependencies":{"apollo-boost":"^0.4.3","apollo-link-context":"^1.0.18","gatsby-image":"^2.2.6","gatsby-source-filesystem":"^2.1.5","gatsby-source-graphql":"^2.1.2","gatsby-source-graphql-universal":"^3.1.3","path-to-regexp":"^3.0.0","prismic-javascript":"^2.0.3","styled-components":"^4.1.3","traverse":"^0.6.6","url-pattern":"^1.0.3"},"peerDependencies":{"gatsby":">2.0.0-alpha","react":"^16.0.0"},"devDependencies":{"@babel/cli":"7.2.3","@babel/core":"7.3.3","@babel/plugin-proposal-class-properties":"7.3.3","@babel/plugin-proposal-object-rest-spread":"7.3.2","@babel/plugin-transform-runtime":"7.2.0","@babel/preset-env":"7.3.1","@babel/preset-react":"7.0.0","@babel/preset-typescript":"7.3.3","@babel/runtime":"7.3.1","@types/lodash":"4.14.121","@types/node":"11.9.4","@types/node-fetch":"2.1.6","@types/react":"16.8.4","@types/styled-components":"^4.1.12","@types/traverse":"^0.6.32","cross-env":"^5.2.0","gatsby":"^2.13.9","prettier":"^1.16.4"},"keywords":["gatsby","gatsby-plugin","graphql","preview","prismic"],"_id":"@eknowles/gatsby-source-prismic-graphql@3.3.2","_nodeVersion":"10.16.0","_npmVersion":"6.10.1","dist":{"integrity":"sha512-65wOssazf7xwu83aKmDcVbh4kroOOQ4KnSa5pm9RXpxhngcIdBmg8MJ71B2VxJUZDCaqeGFpCQW5QGfhQE8rKg==","shasum":"eb01a4db590f8917908f9928f9a628fc983bd90d","tarball":"https://registry.npmjs.org/@eknowles/gatsby-source-prismic-graphql/-/gatsby-source-prismic-graphql-3.3.2.tgz","fileCount":40,"unpackedSize":66459,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdMeiMCRA9TVsSAnZWagAAUo0P/iZL8LruyCBwyqI2mQsF\nv4Q3aAnOawvRmx7hY1J7uwgRFp/o/U+ilOMH0YVHJKw9T3Y7f3FiI9G3+aY2\nXeP3qSME0bQNuNCKTf7AErTdPbtgg6cTucHjaGmJfz4Va2YTl7zt5jxeyB0u\nRTZYP8cDnTCXEaQ29WBmhao0S/5I4fj16xN4nwKh7IJRGvFBe2iI8jY8KAWs\nwa/us2CwCVfIhIBZnkF4OdZ5dJWeOBnrgnpBiAU7fbhvK0Zt1HYKtOL7qo7J\nfE6fLI5bounVRH9yMX/MrsN/FqZz/IgtxULNoPEYC42UnamczsXGW06iGXGv\nJ1mAe7qxOk7raAhpah5sfKH+lFedmgva3Zdd2GdAuk4C6JGFLLtS7SL6Uz6V\nRpem93UaAVdf4l6sGb2joWcEJYLUK0TqXnXaFT2bnsRc+4OqFqXyereTt0xo\nGAFRJQcNd6tzflhenyVOVLyVV1PhtjvmLP44f6qzKLWQ3HaS8LUadLYMkJ1+\nwXanHGhM2sR1Hxx5n6Be+JhtIVJwqjkoCh4gooC5ff6VnR6acpfvOdITiGLP\nNqkthSekt82135DE3c5pP+MqKIHNclZmX9DvKUfQiStEJqV7VD3ogEcK8WTZ\njmku/qG+clFKKLjkNLbi5aKe97DSl5p8y7GY/LwqRJYmJVszPW9MtEmUEM1P\nn5cO\r\n=7zQY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHKbx3EEToM37nCaridl9zqeE8uWZ9bmJ5LIzoyfjFzCAiEAwQK+JGk364MDSrBbnEYQGDWTP+xZgERn8nj7f+3WSHo="}]},"maintainers":[{"name":"eknowles","email":"mail@eknowles.com"}],"_npmUser":{"name":"eknowles","email":"mail@eknowles.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gatsby-source-prismic-graphql_3.3.2_1563551883552_0.008745079913148768"},"_hasShrinkwrap":false},"4.0.1":{"private":false,"name":"@eknowles/gatsby-source-prismic-graphql","description":"Source data from Prismic with GraphQL","license":"MIT","author":{"name":"Birkir Gudjonsson","email":"birkir.gudjonsson@gmail.com"},"homepage":"https://github.com/birkir/gatsby-source-prismic-graphql#readme","repository":{"type":"git","url":"git+https://github.com/birkir/gatsby-source-prismic-graphql.git"},"bugs":{"url":"https://github.com/birkir/gatsby-source-prismic-graphql/issues"},"version":"4.0.1","main":"index.js","scripts":{"build":"tsc --emitDeclarationOnly && babel src --out-dir ./ --extensions '.ts,.tsx'","clean":"rimraf {interfaces,types,components,utils,*.js}","prepare":"yarn clean && cross-env NODE_ENV=production yarn build","start":"babel src --out-dir ./ --extensions '.ts,.tsx' --watch"},"types":"./types/index.d.ts","dependencies":{"apollo-boost":"^0.4.3","apollo-link-context":"^1.0.18","gatsby-image":"^2.2.6","gatsby-source-filesystem":"^2.1.5","gatsby-source-graphql":"^2.1.2","gatsby-source-graphql-universal":"^3.1.3","path-to-regexp":"^3.0.0","prismic-javascript":"^2.0.3","styled-components":"^4.1.3","traverse":"^0.6.6","url-pattern":"^1.0.3"},"peerDependencies":{"gatsby":">2.0.0-alpha","react":"^16.0.0"},"devDependencies":{"@babel/cli":"7.2.3","@babel/core":"7.3.3","@babel/plugin-proposal-class-properties":"7.3.3","@babel/plugin-proposal-object-rest-spread":"7.3.2","@babel/plugin-transform-runtime":"7.2.0","@babel/preset-env":"7.3.1","@babel/preset-react":"7.0.0","@babel/preset-typescript":"7.3.3","@babel/runtime":"7.3.1","@types/lodash":"4.14.121","@types/node":"11.9.4","@types/node-fetch":"2.1.6","@types/react":"16.8.4","@types/styled-components":"^4.1.12","@types/traverse":"^0.6.32","cross-env":"^5.2.0","gatsby":"^2.13.9","prettier":"^1.16.4"},"keywords":["gatsby","gatsby-plugin","graphql","preview","prismic"],"gitHead":"0620f6beebb65c15f10aeb6001f74a1bd4c52b4f","_id":"@eknowles/gatsby-source-prismic-graphql@4.0.1","_nodeVersion":"10.16.0","_npmVersion":"lerna/3.15.0/node@v10.16.0+x64 (darwin)","dist":{"integrity":"sha512-PC0R9PD4txHM70PIuq9AWS63FqBBOHYMDVYcSGbzQFLY46lwogZsPH4pdcENnN/mcK+FIGrpUmkezEQ8FJd5jw==","shasum":"274c5abec420651a4e14ad8d15a46e517258da74","tarball":"https://registry.npmjs.org/@eknowles/gatsby-source-prismic-graphql/-/gatsby-source-prismic-graphql-4.0.1.tgz","fileCount":41,"unpackedSize":68404,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdMlEwCRA9TVsSAnZWagAAh+cQAI3i9y2U3gFlPO+WGNxx\nGOQz9/WfyIG4/WVd6BaUfkhsDZqDHoajqCipHMhN7/dx8bmb3H9zEMy64A1a\noWeLPOzOdSEDhBGdgmY/RduNGzH2JXMqfnzgKjBe4vppr3G9QgU9CuuRwKtL\nIZNBiLR0pctYvQv+64fqqP4wemutShdwBTmHABTJ8Gpk+ZEmkPyP6S8hORI7\n/DI5nhc7YeMNhpzCsIdheDmNR9Xp3cmlqq3+YkVHr7YIKCV/5xBnudsUnT+w\nXrDBumRs4/EVYN+Pr6WIBlrGscv9Tg2qVmMuTjLj9cFiN/UCyrjeK3kPbAR6\nk8tl+e6667DBpqBRy6sfNZhJV3B9bjajyIs/h7Jg8KexYBTL85qpyhSA/aLd\n9XTgizNBU8E7VyI7U4+DuutVZf30nVG8IYCeckm0K+nTxSnMJgf+oqMjNdSE\nfRyW+i2+RUfYDEX7Au/qB4DJR+oOqgmptiFp5/ChntVMu1PvwbohaAPUSb6b\nTl+kii81bSU0ChkRsf3tEAk//t0uB44NpzwFonGbQUhzR6nHnMRxxFNVyFnV\n36QSoYZLMPDyD4Wx975LlgOclYbgmWI6id2UogaObvBFcyY/fSSfTMi0+UlY\nRLDuQeMYE3nI7RgLB1oNnoa4NJmdeeNt2yb3uGmqP34WHY1eCOa7y45JotCC\nf9F4\r\n=M1Uq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDhBuiNr571Gd7OOjqkYGUcAP4kso8oK3E55ofCCZmJZAiEA7ueXzXRXbWYtr9+SoyGfplg6+BrQqTf5HAnlTXiB0bg="}]},"maintainers":[{"name":"eknowles","email":"mail@eknowles.com"}],"_npmUser":{"name":"eknowles","email":"mail@eknowles.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gatsby-source-prismic-graphql_4.0.1_1563578672276_0.8441435660922205"},"_hasShrinkwrap":false}},"time":{"created":"2019-07-15T07:34:45.394Z","3.3.0":"2019-07-15T07:34:45.513Z","modified":"2022-04-05T07:02:47.556Z","3.3.1":"2019-07-19T07:20:27.145Z","3.3.2":"2019-07-19T15:58:03.687Z","4.0.1":"2019-07-19T23:24:32.388Z"},"maintainers":[{"name":"eknowles","email":"mail@eknowles.com"}],"description":"Source data from Prismic with GraphQL","homepage":"https://github.com/birkir/gatsby-source-prismic-graphql#readme","keywords":["gatsby","gatsby-plugin","graphql","preview","prismic"],"repository":{"type":"git","url":"git+https://github.com/birkir/gatsby-source-prismic-graphql.git"},"author":{"name":"Birkir Gudjonsson","email":"birkir.gudjonsson@gmail.com"},"bugs":{"url":"https://github.com/birkir/gatsby-source-prismic-graphql/issues"},"license":"MIT","readme":"# gatsby-source-prismic-graphql\n\nSource data from Prismic with GraphQL\n\n### Differences from `gatsby-source-prismic`\n\nThis plugin will require [graphql enabled](https://prismic.io/blog/graphql-api-alpha-release) in your Prismic instance.\n\nThe feature is currently in _alpha_ and not recommended in production. However that being said, by using Gatsby you have the garantee of production builds to never break as they are\nstatically compiled.\n\n## Installing\n\nInstall module\n\n```bash\nnpm install --save gatsby-source-prismic-graphql\n```\n\nAdd plugin to `gatsby-config.js`:\n\n```js\n{\n  resolve: 'gatsby-source-prismic-graphql',\n  options: {\n    repositoryName: 'gatsby-source-prismic-test-site', // (required)\n    accessToken: '...', // (optional)\n    prismicRef: '...', // (optional, if not used then defaults to master ref. This option is useful for a/b experiments)\n    path: '/preview', // (optional, default: /preview)\n    previews: true, // (optional, default: false)\n    pages: [{ // (optional)\n      type: 'Article',         // TypeName from prismic\n      match: '/article/:uid',  // Pages will be generated under this pattern (optional)\n      path: '/article',        // Placeholder page for unpublished documents\n      component: require.resolve('./src/templates/article.js'),\n    }],\n    sharpKeys: [\n      /image|photo|picture/, // (default)\n      'profilepic',\n    ],\n  }\n}\n```\n\nEdit your `gatsby-browser.js`:\n\n```js\nconst { registerLinkResolver } = require('gatsby-source-prismic-graphql');\nconst { linkResolver } = require('./src/utils/linkResolver');\n\nregisterLinkResolver(linkResolver);\n```\n\n## Usage\n\n### Fetch data from Prismic\n\nIt is very easy to fetch data from prismic.\n\n```jsx\nimport React from 'react';\nimport { RichText } from 'prismic-reactjs';\n\nexport const query = graphql`\n  {\n    prismic {\n      page(uid:\"homepage\", lang:\"en-us\") {\n        title\n        description\n      }\n    }\n  }\n`\n\nexport default function Page({ data }) => <>\n  <h1>{RichText.render(data.prismic.title)}</h1>\n  <h2>{RichText.render(data.prismic.description)}</h1>\n</>\n```\n\n### Prismic Previews\n\nPreviews are enabled by default.\n\n[Read how to enable previews](https://user-guides.prismic.io/preview/how-to-set-up-a-preview/how-to-set-up-a-preview) in your prismic instance.\n\n### Generated pages\n\nYou can generate pages automatically by providing mapping configuration under the `pages` option.\n\nIf you have two blog posts like `foo`, `bar`, it will generate the following URLs:\n\n- /blogpost/foo\n- /blogpost/bar\n\nIf you create a new unpublished blogpost, `baz` it will be accessible for preview under:\n\n- /blogpost?uid=baz\n\n[See the example](https://github.com/birkir/gatsby-source-prismic-graphql/tree/master/examples/default)\n\n```js\n{\n  pages: [{\n    type: 'Article',\n    match: '/blogpost/:uid',\n    path: '/blogpost',\n    component: require.resolve('./src/templates/article.js'),\n  }],\n}\n```\n\n### StaticQuery\n\nYou can use static queries like normal, but if you would like to preview them, use the `withPreview` function.\n\n[See the example](https://github.com/birkir/gatsby-source-prismic-graphql/tree/master/examples/static-query)\n\n```js\nimport { StaticQuery, graphql } from 'gatsby';\nimport { withPreview } from 'gatsby-source-prismic-graphql';\n\nconst articlesQuery = graphql`\n  query {\n    prismic {\n      ...\n    }\n  }\n`;\n\nexport const Articles = () => (\n  <StaticQuery\n    query={articlesQuery}\n    render={withPreview(data => { ... }, articlesQuery)}\n  />\n);\n```\n\n### useStaticQuery\n\nNo support yet.\n\n### Fragments\n\nFragments are supported for both page queries and static queries.\n\n[See the example](https://github.com/birkir/gatsby-source-prismic-graphql/tree/master/examples/fragments)\n\n**Page components**:\n\n```jsx\nimport { graphql } from 'gatsby';\n\nconst fragmentX = graphql` fragment X on Y { ... } `;\n\nexport const query = graphql`\n  query {\n    ...X\n  }\n`;\n\nconst MyPage = (data) => { ... };\nMyPage.fragments = [fragmentX];\n\nexport default MyPage;\n```\n\n**StaticQuery**:\n\n```jsx\nimport { StaticQuery, graphql } from 'gatsby';\nimport { withPreview } from 'gatsby-source-prismic-graphql';\n\nconst fragmentX = graphql` fragment X on Y { ... } `;\n\nexport const query = graphql`\n  query {\n    ...X\n  }\n`;\n\nexport default () => (\n  <StaticQuery\n    query={query}\n    render={withPreview(data => { ... }, query, [fragmentX])}\n  />\n);\n\n```\n\n### Pagination and other dynamic fetching\n\nYou can use this plugin to dynamically fetch different component for your component. This is great for cases like pagination. See the following example:\n\n[See the example](https://github.com/birkir/gatsby-source-prismic-graphql/tree/master/examples/pagination)\n\n```jsx\nimport React from 'react';\nimport { graphql } from 'gatsby';\n\nexport const query = graphql`\n  query Example($limit: Int) {\n    prismic {\n      allArticles(first: $limit) {\n        edges {\n          node {\n            title\n          }\n        }\n      }\n    }\n  }\n`;\n\nexport default function Example({ data, prismic }) {\n  const handleClick = () =>\n    prismic.load({\n      variables: { limit: 100 },\n      query, // (optional)\n      fragments: [], // (optional)\n    });\n\n  return (\n    // ... data\n    <button onClick={handleClick}>load more</button>\n  );\n}\n```\n\n### Working with gatsby-image\n\nLatest version of the plugin supports gatsby-image by adding a new property to graphql types that contain fields that match the `sharpKeys` array (this defaults to `/image|photo|picture/`) with the `Sharp` suffix.\n\n**Note:** When querying, make sure to also query the source field, eg.\n\n```gql\nquery {\n  prismic {\n    Article(id: \"123\") {\n      title\n      articlePhoto\n      articlePhotoSharp {\n        childImageSharp {\n          fluid(maxWidth: 400, maxHeight: 250) {\n            ...GatsbyImageSharpFluid\n          }\n        }\n      }\n    }\n  }\n}\n```\n\nYou can also get access to specific crop sizes from Prismic by passing the `crop` argument:\n\n```gql\nquery {\n  prismic {\n    Author(id: \"123\") {\n      name\n      profile_picture\n      profile_pictureSharp(crop: \"face\") {\n        childImageSharp {\n          fluid(maxWidth: 500, maxHeight: 500) {\n            ...GatsbyImageSharpFluid\n          }\n        }\n      }\n    }\n  }\n}\n```\n\n**NOTE** Does not transform images in preview mode, so make sure to fallback to the default image when the sharp image is null.\n\n```tsx\nimport Img from 'gatsby-image';\nimport get from 'lodash/get';\n\n// ...\n\nconst sharpImage = get(data, 'prismic.Author.profile_pictureSharp.childImageSharp.fluid');\nreturn sharpImage ? (\n  <Img fluid={sharpImage} />\n) : (\n  <img src={get(data, 'prismic.Author.profile_picture.url')} />\n);\n```\n\nLater we may add a Image component that does this for you, and leverages the new Prismic Image API as fallback for preview modes.\n\n### Prismic.io content a/b experiments integration\n\nYou can use this plugin in combination with Prismic's built-in experiments functionality, and a hosting service like Netlify, to run content a/b tests.\n\nExperiments in Prismic are basically branches of the core content, split into 'refs' similar to git branches.\nSo if you want to get content from a certain experiment variation, you can pass the corresponding ref through to Prismic in your request,\nand it will return content based on that ref's variation.\n\nA/B experiments are tricky to implement in a static website though; a/b testing needs a way to dynamically serve up the different variations\nto different website visitors. This is at odds with the idea of a static, non-dynamic website.\n\nFortunately, static hosting providers like Netlify allow you to run a/b tests at a routing level.\nThis makes it possible for us to build multiple versions of our project using different source data, and then within Netlify\nsplit traffic to our different static variations.\n\nTherefore, we can use a/b experiments from Prismic in the following way:\n\n1. Setup an experiment in Prismic.\n\n2. Create a new git branch of your project which will be used to get content. You will need to create a separate git branch for each variation.\n\n3. In that git branch, edit/add the optional 'prismicRef' parameter (documented above). The value of this should be the ref of the variation this git branch is for.\n\n4. Push the newly created branch to your git repo.\n\n5. Now go to your static hosting provider (we'll use Netlify in this example), and setup split testing based on your git branches/Prismic variations.\n\n6. Now your static website will show different experimental variations of the content to different users! At this point the process is manual and non-ideal, but hopefully we'll be able to automate it more in the future.\n\n## How this plugin works\n\n1. The plugin creates a new page at `/preview` (by default, you can change this), that will be your preview URL you setup in the Prismic admin interface.\n\n   It will automatically set cookies based on the query parameters and attempt to find the correct page to redirect to with your linkResolver.\n\n2. It uses a different `babel-plugin-remove-graphql-queries` on the client.\n\n   The modified plugin emits your graphql queries as string so they can be read and re-used on the client side by the plugin.\n\n3. Once redirected to a page with the content, everything will load normally.\n\n   In the background, the plugin takes your original gatsby graphql query, extracts the prismic subquery and uses it to make a graphql request to Prismic with a preview reference.\n\n   Once data is received, it will update the `data` prop with merged data from Prismic preview and re-render the component.\n\n## Development\n\n```bash\ngit clone git@github.com:birkir/gatsby-source-prismic-graphql.git\ncd gatsby-source-prismic-graphql\nyarn install\nyarn setup\nyarn start\n\n# select example to work with\ncd examples/default\nyarn start\n```\n\n## Issues and Troubleshooting\n\nThis plugin does not have gatsby-plugin-sharp support.\n\nPlease raise an issue on GitHub if you have any problems.\n\n### My page graphql query does not hot-reload for previews\n\nThis is a Gatsby limitation. You can bypass this limitation by adding the following:\n\n```jsx\nexport const query = graphql` ... `;\nconst MyPage = () => { ... };\n\nMyPage.query = query; // <-- set the query manually to allow hot-reload.\n```\n","readmeFilename":"README.md"}