{"_id":"@bluesialia/express-graphql","_rev":"9-a177f57eaf982cfb30123e608e9cd31a","name":"@bluesialia/express-graphql","dist-tags":{"latest":"0.15.0"},"versions":{"0.13.0":{"name":"@bluesialia/express-graphql","version":"0.13.0","description":"Production ready GraphQL HTTP middleware.","author":{"name":"Jorge Domínguez Arnáez","email":"bluesialia@gmail.com","url":"BlueSialia"},"license":"MIT","private":false,"main":"dist/index.js","types":"dist/index.d.ts","homepage":"https://github.com/bluesialia/express-graphql","bugs":{"url":"https://github.com/bluesialia/express-graphql/issues"},"repository":{"type":"git","url":"git+https://github.com/bluesialia/express-graphql.git"},"keywords":["express","http","graphql","middleware","api"],"engines":{"node":">= 14.x"},"scripts":{"preversion":". ./resources/checkgit.sh && npm ci","version":"npm test","test":"npm run cspell && npm run lint && npm run prettier:check && npm run build && npm run test:integrations && npm run test:units","test:integrations":"mocha --full-trace integrationTests/index.js","test:units":"mocha --inspect dist/**/__tests__/**/*.js","cspell":"cspell '**/*'","lint":"eslint src","prettier":"prettier --write --list-different .","prettier:check":"prettier --check .","build":"ttsc","build:check":"ttsc --noEmit","start":"node --inspect dist/examples/index.js","start:subscription":"node --inspect dist/examples/index_subscription.js"},"dependencies":{"content-type":"~1.0.4","http-errors":"~2.0.0"},"devDependencies":{"@graphiql/toolkit":"~0.6.0","@types/body-parser":"~1.19.2","@types/chai":"~4.3.1","@types/content-type":"~1.1.5","@types/express":"~4.17.13","@types/http-errors":"~1.8.2","@types/mocha":"~9.1.1","@types/multer":"~1.4.7","@types/node":"~18.0.0","@types/sinon":"~10.0.11","@types/supertest":"~2.0.12","@types/ws":"~8.5.3","@typescript-eslint/eslint-plugin":"~5.29.0","@typescript-eslint/parser":"~5.29.0","body-parser":"~1.20.0","chai":"~4.3.6","cspell":"~6.1.2","eslint":"~8.18.0","express":"~4.18.1","graphiql":"~1.9.9","graphql":"~16.5.0","graphql-ws":"~5.9.0","mocha":"~10.0.0","multer":"~1.4.5-lts.1","prettier":"~2.7.1","promise-polyfill":"~8.2.3","react":"~18.2.0","react-dom":"~18.2.0","sinon":"~14.0.0","supertest":"~6.2.3","ts-node":"~10.8.1","ttypescript":"~1.5.13","typescript":"~4.7.4","unfetch":"~4.2.0","ws":"~8.8.0"},"peerDependencies":{"express":"^4.0.0","graphql":"^16.0.0"},"gitHead":"347e696c00e71b8f4a859f0eff7909a8eaab97f7","_id":"@bluesialia/express-graphql@0.13.0","_nodeVersion":"18.4.0","_npmVersion":"8.12.1","dist":{"integrity":"sha512-hz/+WQ3PSUOC5IQ5upx2QiJQ2w7lU9Z2X1kvOSPF0D3TAnlOE/6d4HnFKpln0V1+mLtw8VBJ4swiQbdqU9JwoQ==","shasum":"9e3424a265c1eeeed3c6da262062b5991f4b9c48","tarball":"https://registry.npmjs.org/@bluesialia/express-graphql/-/express-graphql-0.13.0.tgz","fileCount":9,"unpackedSize":1230810,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGNKmkEuwmxU5PhoU/00CdclO+YXD0wjHIzE9+XheVZ1AiBZ36Uz8mvwibp+A/1KERmE/sGUON5YRi/22mQlKyO28A=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiuYaOACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqTNRAAlXPphIRhsocK/fiDRRhasF75s677uQc3WCENzV55GdmGlrbj\r\nSJ93aQbmyha6hyMsOzZVTzhsI3Upa/xsEeXO2/dlWy41mVXtf3LWXYZAy4qB\r\nJj5TuqFrras4oDnXG3GsYB9KuzfOwJPBG2bJp99ydVgvKtjxp2i1mvKY2avQ\r\nnBc+qztXi1gRfwZd4SDuyWlOYmqryYyOXZYdL0o/kW9m31Rsu0pvPZXpsyxR\r\n/COxazXXfWClcplQswa86WJEdYU//a114R8MLEAK7VxfgxCk3IOZC4EKX0GH\r\nWPfd+ikOY6ACgNS0XI+DFJcZcFKYCp15wOcNu5MWTzTsfeB/zYuAOIw66Enq\r\nVdBECEeyd3yaX92MrQ1wYhrM8sNOtVv+kNO6YFwdHYm0pPJENOF9qIXoczjY\r\n7PirShrdvwLwlLR7Pw3m2vNFRzn4Mfggk6pH/d8Y9pEnPmqWjRngfxukZmbp\r\nDfYQr7cMUVKpOzUUdhz1bCwMaWHPln8N4cNo/v/QIX/QrFsUNwZFpqdWsdi/\r\nOzzkIqH3M1ereWW4bvetfNKNorvsjnAM9xk+kE3JqxKeoIPMK1Gu7UAEzwxG\r\nm3e9s5h/wO3If7DH+NWNenBmWaH9sHBk3U1bRp/ip3Iy63zD30p6/NDpgTXm\r\nMXLdFcns10oqIgDEqXkW7sqSZeuc+zSTG+g=\r\n=hjZF\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bluesialia","email":"bluesialia+npmjs@gmail.com"},"directories":{},"maintainers":[{"name":"bluesialia","email":"bluesialia+npmjs@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express-graphql_0.13.0_1656325774050_0.9147440740812383"},"_hasShrinkwrap":false},"0.14.0":{"name":"@bluesialia/express-graphql","version":"0.14.0","type":"module","description":"Production ready GraphQL HTTP middleware.","author":{"name":"Jorge Domínguez Arnáez","email":"bluesialia@gmail.com","url":"BlueSialia"},"license":"MIT","private":false,"main":"dist/index.js","types":"dist/index.d.ts","homepage":"https://github.com/bluesialia/express-graphql","bugs":{"url":"https://github.com/bluesialia/express-graphql/issues"},"repository":{"type":"git","url":"git+https://github.com/bluesialia/express-graphql.git"},"keywords":["express","http","graphql","middleware","api"],"engines":{"node":">= 14.x"},"scripts":{"preversion":". ./resources/checkgit.sh && npm ci","version":"npm test","test":"npm run cspell && npm run lint && npm run prettier:check && npm run build && npm run test:integrations && npm run test:units","test:integrations":"mocha --full-trace integrationTests/index.js","test:units":"mocha --inspect dist/**/__tests__/**/*.js","cspell":"cspell '**/*'","lint":"eslint src","prettier":"prettier --write --list-different .","prettier:check":"prettier --check .","build":"ttsc && tsc-alias","build:check":"ttsc --noEmit","start":"node --inspect dist/examples/index.js","start:subscription":"node --inspect dist/examples/index_subscription.js"},"dependencies":{"content-type":"~1.0.4","http-errors":"~2.0.0"},"devDependencies":{"@graphiql/toolkit":"~0.6.0","@types/body-parser":"~1.19.2","@types/chai":"~4.3.1","@types/content-type":"~1.1.5","@types/express":"~4.17.13","@types/http-errors":"~1.8.2","@types/mocha":"~9.1.1","@types/multer":"~1.4.7","@types/node":"~18.0.3","@types/sinon":"~10.0.12","@types/supertest":"~2.0.12","@types/ws":"~8.5.3","@typescript-eslint/eslint-plugin":"~5.30.5","@typescript-eslint/parser":"~5.30.5","body-parser":"~1.20.0","chai":"~4.3.6","cspell":"~6.2.2","eslint":"~8.19.0","express":"~4.18.1","graphiql":"~1.9.10","graphql":"~16.5.0","graphql-ws":"~5.9.1","mocha":"~10.0.0","multer":"~1.4.5-lts.1","prettier":"~2.7.1","promise-polyfill":"~8.2.3","react":"~18.2.0","react-dom":"~18.2.0","supertest":"~6.2.4","ts-node":"~10.8.2","tsc-alias":"~1.6.11","ttypescript":"~1.5.13","typescript":"~4.7.4","unfetch":"~4.2.0","ws":"~8.8.0"},"peerDependencies":{"express":"^4.0.0","graphql":"^16.0.0"},"gitHead":"5b82613dd3ad398987a57e151b3db93672e293e3","_id":"@bluesialia/express-graphql@0.14.0","_nodeVersion":"18.4.0","_npmVersion":"8.12.1","dist":{"integrity":"sha512-31qctUimHLupDqvqphVd+viAQvGG2DF/XHVYvowqdFQ+UoAxfKz5Ddg0q5aaMIfbgG9LVdFKsiK9GBOumOxh7A==","shasum":"722393910d44d5489e7007d262d48acbdbfe457f","tarball":"https://registry.npmjs.org/@bluesialia/express-graphql/-/express-graphql-0.14.0.tgz","fileCount":15,"unpackedSize":1248514,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICiCEoCVdgNK1G9BGCwYk9Yq1v5yTwoP8UDt8HZvLGizAiEA1bCgzgVbqln6AbQqjQF9Sn+Ztyp/x3KDPnmIjCvcGa8="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJixbeXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrSsg/+PVvhq1xFu/XYYex3JxSHur9l8JyL2F7+QcEZDFTgpcyucJGe\r\n8uFJfPtARLWNMa9RYbfI6TSfW/+2mTXEcGOXPwtWZoPZlwflkRmkwt9P5ouM\r\nR2T/+rGjQ7fDCHH6B+OfGmfKAUNZ+T5mWhx1La4nY8Iu2evFZCEB1ilQLO2H\r\n4Ep0FMhQ5xbyM9/OYo7yQ4QRTqn4Xpeg1lwMzr+HouxJd5yiwmFOlLKvPBwn\r\nFNIuZzKFRUw+VYGl+tgPh7chI4pUk8kpOvNpCRbHXNOJddH8LiJ03+Du3Axw\r\ngBSjxg0BaBXv+Ds0BDszETfXS4idZjFY2/nJkYq63EXC5zF/NIKy3JmYaL22\r\nIKzXQtUC2w5Zrtr5WUj0KqpphbCBd28ocP7p7Tau5Qll89Ge06eJEZYomtfd\r\nWkHwtdDP/KwFWUymrLH1uMlfF2xiVFAyYQQGrJAdp5NgyoRzn3JtPz+ASBx2\r\nzPiZj68JdzeO+sxZHA6UqKFPD+LqBSLguBhpX294KI+WMIzcIV6raFCx32qW\r\nJnLgtbF/8TXzoK6Mdd6hLsiKDJ/K/cO/25Lv5WU4Mp+XkE+ia992HFr4/eam\r\nyJTnW/8JJwUOnk4SACEF7BgGo6NHXT36xF4g82u6xh1V7Y8NpiNk1KvxmO8M\r\no/ONH+MBcfCddUovctO7E4nhPjzQkEQda1A=\r\n=fbJz\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bluesialia","email":"bluesialia+npmjs@gmail.com"},"directories":{},"maintainers":[{"name":"bluesialia","email":"bluesialia+npmjs@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express-graphql_0.14.0_1657124759607_0.23875827535550398"},"_hasShrinkwrap":false},"0.14.1":{"name":"@bluesialia/express-graphql","version":"0.14.1","type":"module","description":"Production ready GraphQL HTTP middleware.","author":{"name":"Jorge Domínguez Arnáez","email":"bluesialia@gmail.com","url":"BlueSialia"},"license":"MIT","private":false,"main":"dist/index.js","types":"dist/index.d.ts","homepage":"https://github.com/bluesialia/express-graphql","bugs":{"url":"https://github.com/bluesialia/express-graphql/issues"},"repository":{"type":"git","url":"git+https://github.com/bluesialia/express-graphql.git"},"keywords":["api","express","http","graphql","graphiql","middleware"],"engines":{"node":">= 16.x"},"scripts":{"preversion":"./resources/checkgit.sh && npm ci","version":"npm test","test":"npm run cspell && npm run lint && npm run prettier:check && npm run build && npm run test:integrations && npm run test:units","test:integrations":"mocha --full-trace integrationTests/index.js","test:units":"mocha --inspect dist/**/__tests__/**/*.js","cspell":"cspell '**/*'","lint":"eslint src","prettier":"prettier --write --list-different .","prettier:check":"prettier --check .","build":"ttsc && tsc-alias","build:check":"ttsc --noEmit","start":"node --inspect dist/examples/index.js","start:subscription":"node --inspect dist/examples/index_subscription.js"},"dependencies":{"content-type":"~1.0.4","http-errors":"~2.0.0"},"devDependencies":{"@graphiql/toolkit":"~0.6.0","@types/body-parser":"~1.19.2","@types/chai":"~4.3.1","@types/content-type":"~1.1.5","@types/express":"~4.17.13","@types/http-errors":"~1.8.2","@types/mocha":"~9.1.1","@types/multer":"~1.4.7","@types/node":"~18.0.3","@types/sinon":"~10.0.12","@types/supertest":"~2.0.12","@types/ws":"~8.5.3","@typescript-eslint/eslint-plugin":"~5.30.5","@typescript-eslint/parser":"~5.30.5","body-parser":"~1.20.0","chai":"~4.3.6","cspell":"~6.2.3","eslint":"~8.19.0","express":"~4.18.1","graphiql":"~1.9.11","graphql":"~16.5.0","graphql-ws":"~5.9.1","mocha":"~10.0.0","multer":"~1.4.5-lts.1","prettier":"~2.7.1","promise-polyfill":"~8.2.3","react":"~18.2.0","react-dom":"~18.2.0","supertest":"~6.2.4","ts-node":"~10.8.2","tsc-alias":"~1.6.11","ttypescript":"~1.5.13","typescript":"~4.7.4","unfetch":"~4.2.0","ws":"~8.8.0"},"peerDependencies":{"express":"^4.0.0","graphql":"^16.0.0"},"gitHead":"9bb80ecb049f13a51f89f2e3466199b7eb12b5c2","_id":"@bluesialia/express-graphql@0.14.1","_nodeVersion":"18.4.0","_npmVersion":"8.12.1","dist":{"integrity":"sha512-dIpxo9ogcG+su7OwPV4kus4p4suSCv7WiBrJQLhxSx08dI20pfT4jZwJNpb6zmdUYbykNj3X5uAvX5QIglLPZQ==","shasum":"5f3a8b9cea73b96b10f64d745d1f4a72e322af67","tarball":"https://registry.npmjs.org/@bluesialia/express-graphql/-/express-graphql-0.14.1.tgz","fileCount":15,"unpackedSize":1251154,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDMUwLkgjdI1koyRorC5y0h1FQmrjdVFkStWJvvy0a5SQIgNQlIC/LcAZp18IYZGg8TBClyqSjCevypPWpHGM/W0Hc="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiyYvNACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq4Fg/6Ak483xDxIbKUeH2QVCC84hIPOCAK9gyJIa4pc75tiMhUJjkq\r\ndWnhDDoTf/Pus4ksu61P5KCryTeJb9IqhK8eVDpmXtL3nnh4v1z48SU+Xoc7\r\nmmXRneyI1GiyZnzIcS4qHnIGZ6Fm/m3G3PxK7e0gPOWG2Xs3Q6g+LBbJQDhi\r\nS7EtY44ZFKPKHn35SCIJuoTN9mvsJ0B0bYC2n/f++Z/LowrbeDGEJYeQ80om\r\nIiW0vPy41voY5OCzM8G4hVPpLki+DFp2uovI9TwtpDDYes9Qi4ocXeHsZfMm\r\n+pIJCSeuligJ5KWoPn+CpZ+NN1VHEbn+791Kf6VdRbUzm0mNEF3/3Rc3Iv7C\r\nb8lA6X9T/sgISXjp5yvNFE68HcYlTImQHptN6FyrOq6GsnU1NCB3SsY3V58F\r\nMJjSv3hSw98hLz7Xfo/qavrkIv+JLq6P0lYU/bfBpxODIQ6y54pWvMN72U5+\r\nXPi2lUlgCYGuB/6fxZCzskfyek0wZ3+XGIKOt3gDlxJvaY8XRINC7Bal7RqH\r\ne8iCwrTkCPFYpWoS27qR4A0cTbmXzLL6WyD/DRE1tcMppqRN8YQd7plXD3Pc\r\n0+jtyrMEJz+eEEyO2aFasXqK9bDd6o6N3hCyrdrVIndHb9BlT85pmXN3uW40\r\nRDPjYt0ojZY1l4wXpDdB6X3ZbF4a6YgUs1o=\r\n=K4OK\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bluesialia","email":"bluesialia+npmjs@gmail.com"},"directories":{},"maintainers":[{"name":"bluesialia","email":"bluesialia+npmjs@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express-graphql_0.14.1_1657375693753_0.25734779727485035"},"_hasShrinkwrap":false},"0.14.4":{"name":"@bluesialia/express-graphql","version":"0.14.4","type":"module","description":"Production ready GraphQL HTTP middleware.","author":{"name":"Jorge Domínguez Arnáez","email":"bluesialia@gmail.com","url":"BlueSialia"},"license":"MIT","private":false,"main":"dist/index.js","types":"dist/index.d.ts","homepage":"https://github.com/bluesialia/express-graphql","bugs":{"url":"https://github.com/bluesialia/express-graphql/issues"},"repository":{"type":"git","url":"git+https://github.com/bluesialia/express-graphql.git"},"keywords":["api","express","http","graphql","graphiql","middleware"],"engines":{"node":">= 16.x"},"scripts":{"preversion":"./resources/checkgit.sh && npm ci","version":"npm test","test":"npm run cspell && npm run prettier:check && npm run build && npm run test:integrations && npm run test:units","test:integrations":"mocha --full-trace integrationTests/index.js","test:units":"mocha --inspect dist/**/__tests__/**/*.js","cspell":"cspell '**/*'","prettier":"prettier --write --list-different --use-tabs .","prettier:check":"prettier --check --use-tabs .","build":"ttsc && tsc-alias","build:check":"ttsc --noEmit","start":"node --inspect dist/examples/index.js","start:subscription":"node --inspect dist/examples/index_subscription.js"},"dependencies":{"content-type":"~1.0.4","http-errors":"~2.0.0"},"devDependencies":{"@graphiql/toolkit":"~0.6.0","@types/body-parser":"~1.19.2","@types/chai":"~4.3.1","@types/content-type":"~1.1.5","@types/express":"~4.17.13","@types/http-errors":"~1.8.2","@types/mocha":"~9.1.1","@types/multer":"~1.4.7","@types/node":"~18.0.3","@types/supertest":"~2.0.12","@types/ws":"~8.5.3","body-parser":"~1.20.0","chai":"~4.3.6","cspell":"~6.2.3","express":"~4.18.1","graphiql":"~1.9.11","graphql":"~16.5.0","graphql-ws":"~5.9.1","mocha":"~10.0.0","multer":"~1.4.5-lts.1","prettier":"~2.7.1","promise-polyfill":"~8.2.3","react":"~18.2.0","react-dom":"~18.2.0","supertest":"~6.2.4","ts-node":"~10.8.2","tsc-alias":"~1.6.11","ttypescript":"~1.5.13","typescript":"~4.7.4","unfetch":"~4.2.0","ws":"~8.8.0"},"peerDependencies":{"express":"^4.0.0","graphql":"^16.0.0"},"gitHead":"2ac39e3dd7296532a70c060b6b0c2cf196033fa6","_id":"@bluesialia/express-graphql@0.14.4","_nodeVersion":"18.5.0","_npmVersion":"8.12.1","dist":{"integrity":"sha512-oUBsSNYd1HrJkSuSjsNiF+UbnLr/hCmi1RQa5+of7niJ2oZ6g/BKzPzFYGrZgueyZare//wjrBlD8Z2MrnvZAQ==","shasum":"69598e21fe64d687dfecff7c1743181efd5978e4","tarball":"https://registry.npmjs.org/@bluesialia/express-graphql/-/express-graphql-0.14.4.tgz","fileCount":17,"unpackedSize":1252846,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFBEPCclUFe3dF1qeO1fJhTtLJjTyhV6weP4TrBNgHN9AiBRhDAllp0Cvmwui94YZ2VTsFtolaLGKiGrI/ypg6I07w=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJizSFXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrdRA/8DEQlFi2MCEm5kNkwHQrZ1rFKG3yBBa9Y1SUSgKExF11rDZHT\r\nsOWvPK2qnxN6SMng34suMt3i+McBYXb2d1PBaPPJNJk7O5YVN8OLnZZwEu4u\r\nvleZJzED1q4bXKY7d2TX5qa4MPYeAuBbRZcs3YLP/fPP+sMIeMfJZcESMlG+\r\nqsw9m7v+CIcmZkK6buug9g756Lacq1zvChp2+NSbzXM66wvkUJhfqTt0p5CK\r\n/Op1KeEkrV4uHIhwxuqriMdGPHjgtU7gL0mGXp6fOxEQAyDZhjWgJCryzOnk\r\nA30HX9amJWt5+J6JIkfiFN7mvkfuoGb1H5ruOkabdRcbMZL87nkqLqhQ5FPr\r\nAwx3wT96hAS6IX4sA0iNIyCn62UPrOVrvwZqYUaw+jNrq8NqI7pbYT5rLKsx\r\nBVJ5tvqfpPP/U4gfzB3ZBWv86djdk8lotGiVQLVMqlvPe60hrzkTuYkOIhao\r\n1OaNINKL+bFW7pDS383/vPcXS5ProEESe1CdSrcwdMt6LwL9C88IMVsP9lr4\r\ntOMH88t6j+QTjn+5ACKX3b0A0BKKU7ir0iS/URlg8uvAvhTmzdRPhSgd/wZT\r\nSxP4s1VQT5hXE1hyQK79KVsgRcLsFrTqCL+fUYYb+/xY4KqTZgzb2NhBqONa\r\nNJokOzwwbxnkZbv7JB+zvgkB/GWJDvJ2GYc=\r\n=E+xV\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bluesialia","email":"bluesialia+npmjs@gmail.com"},"directories":{},"maintainers":[{"name":"bluesialia","email":"bluesialia+npmjs@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express-graphql_0.14.4_1657610583487_0.48968815405142085"},"_hasShrinkwrap":false},"0.14.5":{"name":"@bluesialia/express-graphql","version":"0.14.5","type":"module","description":"Production ready GraphQL HTTP middleware.","author":{"name":"Jorge Domínguez Arnáez","email":"bluesialia@gmail.com","url":"BlueSialia"},"license":"MIT","private":false,"main":"dist/index.js","types":"dist/index.d.ts","homepage":"https://github.com/bluesialia/express-graphql","bugs":{"url":"https://github.com/bluesialia/express-graphql/issues"},"repository":{"type":"git","url":"git+https://github.com/bluesialia/express-graphql.git"},"keywords":["api","express","http","graphql","graphiql","middleware"],"engines":{"node":">= 16.x"},"scripts":{"preversion":"./resources/checkgit.sh && npm ci","version":"npm test","test":"npm run cspell && npm run prettier:check && npm run build && npm run test:integrations && npm run test:units","test:integrations":"mocha --full-trace integrationTests/index.js","test:units":"mocha --inspect dist/**/__tests__/**/*.js","cspell":"cspell '**/*'","prettier":"prettier --write --list-different --use-tabs .","prettier:check":"prettier --check --use-tabs .","build":"ttsc && tsc-alias","build:check":"ttsc --noEmit","start":"node --inspect dist/examples/index.js","start:subscription":"node --inspect dist/examples/index_subscription.js"},"dependencies":{"content-type":"~1.0.4","http-errors":"~2.0.0"},"devDependencies":{"@graphiql/toolkit":"~0.6.0","@types/body-parser":"~1.19.2","@types/chai":"~4.3.1","@types/content-type":"~1.1.5","@types/express":"~4.17.13","@types/http-errors":"~1.8.2","@types/mocha":"~9.1.1","@types/multer":"~1.4.7","@types/node":"~18.6.3","@types/supertest":"~2.0.12","@types/ws":"~8.5.3","body-parser":"~1.20.0","chai":"~4.3.6","cspell":"~6.5.0","express":"~4.18.1","graphiql":"~1.10.0","graphql":"~16.5.0","graphql-ws":"~5.9.1","mocha":"~10.0.0","multer":"~1.4.5-lts.1","prettier":"~2.7.1","promise-polyfill":"~8.2.3","react":"~18.2.0","react-dom":"~18.2.0","supertest":"~6.2.4","ts-node":"~10.9.1","tsc-alias":"~1.7.0","ttypescript":"~1.5.13","typescript":"~4.7.4","unfetch":"~4.2.0","ws":"~8.8.1"},"peerDependencies":{"express":"^4.0.0","graphql":"^16.0.0"},"gitHead":"a41b1f6aa208e33ba5ba6418f5f6d5cc566ad9d2","_id":"@bluesialia/express-graphql@0.14.5","_nodeVersion":"18.4.0","_npmVersion":"8.12.1","dist":{"integrity":"sha512-sgddJVJrxd7gP2yh6ByDBlSBCGcz6D8pBHKvRhFWSxbBM2t2Zz9jmBM2we5ifwdSs3yB5fDLMDZ+EtOm35hKlw==","shasum":"00e9797a6d694e691e8a30fdb9195da55f86bb0e","tarball":"https://registry.npmjs.org/@bluesialia/express-graphql/-/express-graphql-0.14.5.tgz","fileCount":15,"unpackedSize":1260908,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG3tsijmzBIlVbeoNNaTm+jWOfh/xty0GSd3FP3DZXzDAiBZgYy4ZW84o9amVfQomoHZ9sEdpuQJOJtnKVy0ULtcgA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi6mMqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoS5Q/8CKroSOe5FX9k0zMGaSaYJ0Jw+kcdPurdJ+vxiKpH7DqIdtcU\r\nAHSq7wqxo3LfsggbeNQ4+Nl28Q/Ua8takIsC/dkgh0wet9/K/PMXe7XSkKR8\r\nuXvAGfUVCOoJY3Qc92W+zLgIGseL8hK2Jq6f4vikraYrzCPjSebINjbgKkNW\r\nLES1Gs7cAURa49+kFgoFjKHE5n8J5krmaGCah6BVEg2xzMcgrpNVMpEuXA27\r\naWDtGMT6dvlVpDlB7vXk/F1xkSQduKhY1bjwFexNb3wH+SKEpcRL7ny7/bZK\r\npb0qTv4iAZoXWY+Esz18JJJCwYWc5lp+zCic/UowRb2T66R0LYv2qpLHIn6Y\r\nbY6fn++BdafaTjoGy+cXjorc63Cvnvy2TprwsnpC2BiaAcXOahflsAzND7Ty\r\nS7bW6L7faIsF5zTTX/3asOgzE/NKqBB6+sKo8jdrT0OXf9dHNfS1b6itPkGS\r\n6LZrqbptl1Dv7a+zoE18X3ygR1F6qM3K6m53uaP+g88yrTIM4k88bUsjReS3\r\n4ibqCQQdkw1I1r3IbXY+czgeFSXzekNO3e9AQxGBcZ7N/FExrPSae+IgjVQI\r\niIiZ4v1R6XczEqgx9yMMYJOovWqFqciQM6nYa550bMdK3vWts8WUvbdRaJQm\r\neYVSJExPzxMvwlvwzJGgxM5Pp6HJeoTZcNE=\r\n=CiW4\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bluesialia","email":"bluesialia+npmjs@gmail.com"},"directories":{},"maintainers":[{"name":"bluesialia","email":"bluesialia+npmjs@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express-graphql_0.14.5_1659527978289_0.2541063595629629"},"_hasShrinkwrap":false},"0.15.0":{"name":"@bluesialia/express-graphql","version":"0.15.0","type":"module","description":"Production ready GraphQL HTTP middleware.","author":{"name":"Jorge Domínguez Arnáez","email":"bluesialia@gmail.com","url":"BlueSialia"},"license":"MIT","private":false,"exports":"./dist/index.js","types":"dist/index.d.ts","homepage":"https://github.com/bluesialia/express-graphql","bugs":{"url":"https://github.com/bluesialia/express-graphql/issues"},"repository":{"type":"git","url":"git+https://github.com/bluesialia/express-graphql.git"},"keywords":["api","express","http","graphql","graphiql","middleware"],"engines":{"node":">= 16.x"},"scripts":{"preversion":"./resources/checkgit.sh && npm ci","version":"npm test","test":"npm run cspell && npm run prettier:check && npm run build && npm run test:integrations && npm run test:units","test:integrations":"mocha --full-trace integrationTests/index.js","test:units":"mocha --inspect dist/**/__tests__/**/*.js","cspell":"cspell '**/*'","prettier":"prettier --write --list-different --use-tabs .","prettier:check":"prettier --check --use-tabs .","build":"ttsc","build:check":"ttsc --noEmit","start":"node --inspect dist/examples/index.js","start:subscription":"node --inspect dist/examples/index_subscription.js"},"dependencies":{"content-type":"~1.0.4","http-errors":"~2.0.0"},"devDependencies":{"@graphiql/toolkit":"~0.8.0","@types/body-parser":"~1.19.2","@types/chai":"~4.3.4","@types/content-type":"~1.1.5","@types/express":"~4.17.14","@types/http-errors":"~2.0.1","@types/mocha":"~10.0.0","@types/multer":"~1.4.7","@types/node":"~18.11.9","@types/supertest":"~2.0.12","@types/ws":"~8.5.3","body-parser":"~1.20.1","chai":"~4.3.7","cspell":"~6.14.2","express":"~4.18.2","graphiql":"~2.1.0","graphql":"~16.6.0","graphql-ws":"~5.11.2","mocha":"~10.1.0","multer":"~1.4.5-lts.1","prettier":"~2.7.1","promise-polyfill":"~8.2.3","react":"~18.2.0","react-dom":"~18.2.0","supertest":"~6.3.1","ts-node":"~10.9.1","ttypescript":"~1.5.13","typescript":"~4.8.4","unfetch":"~4.2.0","ws":"~8.11.0"},"peerDependencies":{"express":"^4.0.0","graphql":"^16.0.0"},"gitHead":"33844047c7440413c135793c3c82446790bedfb0","_id":"@bluesialia/express-graphql@0.15.0","_nodeVersion":"18.12.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-e6rxGPpaCxnboaLwCZ52W2TLGq347OaO4Z2LDzAUJlZv7cdAvlXqVBdWrmGXbvwx3GiXyAgQlibqbdbXxYQ1Pw==","shasum":"9312d0fe80bfd6400a3e13cf7112df16c28aff1c","tarball":"https://registry.npmjs.org/@bluesialia/express-graphql/-/express-graphql-0.15.0.tgz","fileCount":15,"unpackedSize":1688751,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGz+pcBiVhunpHfKtzwZLY1Dm1JkByuFHqtKHaLle2/zAiEA5jufjvqmXcyWaPhbMMK11BRdCGcWLYxLvIC8ear/na0="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjdQBSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpAeQ/9GQf5+HC4osaMOtTZnJ3JQ+UOIW+G7u+izZRVicoL6/9vilpO\r\nGuo+ImhyfAL6WNpL4tu+B2P1xRkn4lzUwk8i2uI+WSBv51K9Pj49brs2sU7f\r\nGiIhDdCnGxjU5QSxXpeuhVhzZDnuPtbn64lGHWVMWoPc+D60Hz6ZczxXyEej\r\nXgz+yEqjzC3H3e6LAZl0ajYXnQmxCfot0cIiE9YlBj3bHIWGKahBIL1vbanz\r\nFHhr+3JWBQcV8SYDd6ugOOEKjAafRihFtzPkHkfkUkAwM8mZ/T0OP9ZYnP8j\r\nuZEYTcPnKze09cPqExnMMrALN3blJTc+vZi7zJTIX/pIjDJLq6+MkZknzHbx\r\nThQiFcZXX+icbyQ7P9YBvrvNp5TSfy+ufV2NiDJqD0w/9o9Q/v+Wlr50TAIg\r\nS3XMH1fVFekIfzcKuaospPF+jkhzXFzETv9bfwM+ccaUZdExDgt1aw0aaTT7\r\n6hNoYgcgohYLJ1fw+RGjW7TY36NLzWzbraP9weketLyqz1iyKVHJcZYyw1f/\r\nPg+2S3eRdJhMcKCGLNGnEmspEUqtxkaMCbPEetruFlVZ+CuIF/QGYIAiX3Yj\r\n7jpTkCAXt3Nxv2Md9F90o1ldQNAlYRhVAoLMLynkSM9zNDDT8gRlvKD8RKq0\r\nnNtFKWGeIkp8+GJzu0VJXTFpzS8stKN3ei0=\r\n=drG1\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bluesialia","email":"bluesialia+npmjs@gmail.com"},"directories":{},"maintainers":[{"name":"bluesialia","email":"bluesialia+npmjs@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/express-graphql_0.15.0_1668612178292_0.4289852008522461"},"_hasShrinkwrap":false}},"time":{"created":"2022-06-22T07:27:36.102Z","0.12.0":"2022-06-22T07:27:36.396Z","modified":"2022-11-16T15:22:58.595Z","0.13.0":"2022-06-27T10:29:34.214Z","0.14.0":"2022-07-06T16:25:59.827Z","0.14.1":"2022-07-09T14:08:13.890Z","0.14.2":"2022-07-11T16:55:50.854Z","0.14.4":"2022-07-12T07:23:03.824Z","0.14.5":"2022-08-03T11:59:38.757Z","0.15.0":"2022-11-16T15:22:58.504Z"},"maintainers":[{"name":"bluesialia","email":"bluesialia+npmjs@gmail.com"}],"description":"Production ready GraphQL HTTP middleware.","homepage":"https://github.com/bluesialia/express-graphql","keywords":["api","express","http","graphql","graphiql","middleware"],"repository":{"type":"git","url":"git+https://github.com/bluesialia/express-graphql.git"},"author":{"name":"Jorge Domínguez Arnáez","email":"bluesialia@gmail.com","url":"BlueSialia"},"bugs":{"url":"https://github.com/bluesialia/express-graphql/issues"},"license":"MIT","readme":"# GraphQL HTTP Server Middleware\n\n[![NPM version](https://badgen.net/npm/v/@bluesialia/express-graphql?icon=https://raw.githubusercontent.com/FortAwesome/Font-Awesome/6.x/svgs/brands/npm.svg&label)](https://www.npmjs.com/package/@bluesialia/express-graphql)\n[![Node version](https://badgen.net/npm/node/@bluesialia/express-graphql?icon=https://raw.githubusercontent.com/FortAwesome/Font-Awesome/6.x/svgs/brands/node-js.svg&label)](https://nodejs.org/en/)\n![Typescript types](https://badgen.net/npm/types/@bluesialia/express-graphql?icon=typescript&label)\n[![LICENSE](https://badgen.net/npm/license/@bluesialia/express-graphql?icon=https://raw.githubusercontent.com/FortAwesome/Font-Awesome/6.x/svgs/solid/copyright.svg&label)](LICENSE)\n\n\n[![Tests](https://badgen.net/github/checks/bluesialia/express-graphql?icon=https://raw.githubusercontent.com/FortAwesome/Font-Awesome/6.x/svgs/solid/flask-vial.svg&label)](https://github.com/BlueSialia/express-graphql/actions/workflows/node.js.yml)\n[![Package size](https://badgen.net/bundlephobia/min/@bluesialia/express-graphql?icon=https://raw.githubusercontent.com/FortAwesome/Font-Awesome/6.x/svgs/solid/file.svg&label)](https://bundlephobia.com/package/@bluesialia/express-graphql)\n[![Zipped package size](https://badgen.net/bundlephobia/minzip/@bluesialia/express-graphql?icon=https://raw.githubusercontent.com/FortAwesome/Font-Awesome/6.x/svgs/solid/file-zipper.svg&label)](https://bundlephobia.com/package/@bluesialia/express-graphql)\n[![Dependencies](https://badgen.net/bundlephobia/dependency-count/@bluesialia/express-graphql?icon=https://raw.githubusercontent.com/FortAwesome/Font-Awesome/6.x/svgs/solid/diagram-project.svg&label)](https://www.npmjs.com/package/@bluesialia/express-graphql?activeTab=dependencies)\n\nCreate a GraphQL HTTP server with [Express](https://expressjs.com).\n\n## Installation\n\n```sh\nnpm install --save @bluesialia/express-graphql\n```\n\nThis package needs [Express](https://www.npmjs.com/package/express) and [GraphQL](https://www.npmjs.com/package/graphql) as peer dependencies. So if you don't have those installed yet, install them with:\n```sh\nnpm install --save express graphql\n```\n\n### TypeScript\n\nThis module includes a [TypeScript](https://www.typescriptlang.org/) declaration file to enable auto complete in compatible editors and type information for TypeScript projects.\n\n## Simple Setup\n\nJust mount `express-graphql` as a route handler:\n\n```ts\nimport { graphqlHTTP } from '@bluesialia/express-graphql';\nimport express from 'express';\nimport { buildSchema } from 'graphql';\n\nconst PORT = 12000;\n\n// Construct a schema, using GraphQL schema language\nconst schema = buildSchema(`\n  type Query {\n    hello: String\n  }\n`);\n\n// The root provides a resolver function for each API endpoint\nconst rootValue = {\n  hello: () => 'Hello world!',\n};\n\nconst app = express();\napp.use(\n  '/graphql',\n  graphqlHTTP({\n    schema,\n    rootValue,\n    graphiql: true,\n  }),\n);\napp.listen(PORT);\n```\n\n## Setup with Subscription Support\n\n```ts\nimport { graphqlHTTP } from '@bluesialia/express-graphql';\nimport express from 'express';\nimport { buildSchema, execute, subscribe } from 'graphql';\nimport { useServer } from 'graphql-ws/lib/use/ws';\nimport { createServer } from 'http';\nimport { WebSocketServer } from 'ws';\n\nconst sleep = ms => new Promise(r => setTimeout(r, ms));\n\nconst PORT = 12000;\nconst subscriptionUrl = `ws://localhost:${PORT}/subscriptions`;\n\n// Construct a schema, using GraphQL schema language\nconst schema = buildSchema(`\n  type Query {\n    hello: String\n  }\n  type Subscription {\n    countDown: Int\n  }\n`);\n\n// The root provides a resolver function for each API endpoint\nconst roots = {\n  Query: {\n    hello: () => 'Hello World!',\n  },\n  subscription: {\n    countDown: async function* fiveToOne() {\n      for (const number of [5, 4, 3, 2, 1]) {\n        await sleep(1000);\n        yield { countDown: number };\n      }\n    },\n  },\n};\n\nconst rootValue = {\n  hello: roots.Query.hello,\n  countDown: roots.subscription.countDown,\n};\n\nconst app = express();\napp.use(\n  '/graphql',\n  graphqlHTTP({\n    schema,\n    rootValue,\n    graphiql: {\n      fetcher: {\n        url: `http://localhost:${PORT}/graphql`,\n        subscriptionUrl,\n      },\n    },\n  }),\n);\n\nconst server = createServer(app);\n\nconst wsServer = new WebSocketServer({\n  server,\n  path: '/subscriptions',\n});\n\nserver.listen(PORT, () => {\n  // Set up the WebSocket for handling GraphQL subscriptions.\n  useServer(\n    {\n      schema,\n      roots,\n      execute,\n      subscribe,\n    },\n    wsServer,\n  );\n});\n```\n\n## Options\n\nThe `graphqlHTTP` function accepts the following options:\n\n- **`schema`**: A `GraphQLSchema` instance from [`GraphQL.js`](https://github.com/graphql/graphql-js/blob/main/src/type/schema.ts#L135). A `schema` _must_ be provided.\n\n- **`graphiql`**: A boolean to optionally enable [GraphiQL](https://github.com/graphql/graphiql/tree/main/packages/graphiql) when the GraphQL endpoint is loaded in a browser. We recommend that you set `graphiql` to `true` when your app is in development, because it's quite useful. You may or may not want it in production. Alternatively, instead of `true` you can pass in an altered [GraphiQLProps](https://github.com/graphql/graphiql/blob/main/packages/graphiql/src/components/GraphiQL.tsx#L97) object:\n\n  - **`fetcher`**: GraphiQLProps requires a `fetcher` property that evaluates to a Fetcher object. In express-graphql's case the `fetcher` property contains an object containing the following properties that will be used to create the Fetcher object:\n\n    - **`url`**: URL for HTTP(S) requests. Required if you provide a `fetcher` property. Otherwise, the URL where you exposed the GraphiQL will be used.\n\n    - **`subscriptionUrl`**: URL for websocket subscription requests.\n\n    - **`headers`**: Headers you can provide statically. If you enable the headers editor and the user provides a header you set statically here, it will be overriden by their value.\n\n- **`rootValue`**: A value to pass as the `rootValue` to the `execute()` function from [`GraphQL.js/src/execution/execute.ts`](https://github.com/graphql/graphql-js/blob/main/src/execution/execute.ts#148).\n\n- **`context`**: A value to pass as the `contextValue` to the `execute()` function from [`GraphQL.js/src/execution/execute.ts`](https://github.com/graphql/graphql-js/blob/main/src/execution/execute.ts#L149). If `context` is not provided, the `request` object is passed as the context.\n\n- **`pretty`**: A boolean to configure whether the output should be pretty-printed.\n\n- **`extensions`**: An optional function for adding additional metadata to the GraphQL response as a key-value object. The result will be added to the `\"extensions\"` field in the resulting JSON. This is often a useful place to add development time metadata such as the runtime of a query or the amount of resources consumed. This may be an async function. The function is given one object as an argument: `{ document, variables, operationName, result, context }`.\n\n- **`validationRules`**: An optional array of validation rules that will be applied on the document in addition to those defined by the GraphQL spec.\n\n- **`validateFn`**: An optional function which will be used to validate instead of default `validate` from `graphql-js`.\n\n- **`executeFn`**: An optional function which will be used to execute instead of default `execute` from `graphql-js`.\n\n- **`formatErrorFn`**: An optional function which will be used to format any errors produced by fulfilling a GraphQL operation. If no function is provided, GraphQL's default function will be used.\n\n- **`parseFn`**: An optional function which will be used to create a document instead of the default `parse` from `graphql-js`.\n\nIn addition to an object defining each option, options can also be provided as a function (or async function) which returns this options object. This function is provided the arguments `(request, response, graphQLParams)` and is called after the request has been parsed.\n\nThe `graphQLParams` is provided as the object `{ query, variables, operationName, raw }`.\n\n```js\napp.use(\n  '/graphql',\n  graphqlHTTP(async (request, response, graphQLParams) => ({\n    schema: MyGraphQLSchema,\n    rootValue: await someFunctionToGetRootValue(request),\n    graphiql: true,\n  })),\n);\n```\n\n## HTTP Usage\n\nOnce installed at a path, `express-graphql` will accept requests with the parameters:\n\n- **`query`**: A string GraphQL document to be executed.\n\n- **`variables`**: The runtime values to use for any GraphQL query variables as a JSON object.\n\n- **`operationName`**: If the provided `query` contains multiple named operations, this specifies which operation should be executed. If not provided, a 400 error will be returned if the `query` contains multiple named operations.\n\n- **`raw`**: If the `graphiql` option is enabled and the `raw` parameter is provided, raw JSON will always be returned instead of GraphiQL even when loaded from a browser.\n\nGraphQL will first look for each parameter in the query string of a URL:\n\n```\n/graphql?query=query+getUser($id:ID){user(id:$id){name}}&variables={\"id\":\"4\"}\n```\n\nIf not found in the query string, it will look in the POST request body.\n\nIf a previous middleware has already parsed the POST body, the `request.body` value will be used. Use [`multer`](https://www.npmjs.com/package/multer) or a similar middleware to add support for `multipart/form-data` content, which may be useful for GraphQL mutations involving uploading files. See an [example using multer](https://github.com/bluesialia/express-graphql/blob/main/src/__tests__/http-test.ts#L857-L892).\n\nIf the POST body has not yet been parsed, `express-graphql` will interpret it depending on the provided _Content-Type_ header.\n\n- **`application/json`**: the POST body will be parsed as a JSON object of parameters.\n\n- **`application/x-www-form-urlencoded`**: the POST body will be parsed as a url-encoded string of key-value pairs.\n\n- **`application/graphql`**: the POST body will be parsed as GraphQL query string, which provides the `query` parameter.\n\n## Combining with Other Express Middleware\n\nBy default, the express request is passed as the GraphQL `context`. Since most express middleware operates by adding extra data to the request object, this means you can use most express middleware just by inserting it before `graphqlHTTP` is mounted. This covers scenarios such as authenticating the user, handling file uploads, or mounting GraphQL on a dynamic endpoint.\n\nThis example uses [`express-session`][] to provide GraphQL with the currently logged-in session.\n\n```ts\nimport { graphqlHTTP } from '@bluesialia/express-graphql';\nimport express from 'express';\nimport session from 'express-session';\n\nconst app = express();\n\napp.use(session({ secret: 'keyboard cat', cookie: { maxAge: 60000 } }));\n\napp.use(\n  '/graphql',\n  graphqlHTTP({\n    schema: MySessionAwareGraphQLSchema,\n    graphiql: true,\n  }),\n);\n```\n\nThen in your type definitions, you can access the request via the third \"context\" argument in your `resolve` function:\n\n```ts\nnew GraphQLObjectType({\n  name: 'MyType',\n  fields: {\n    myField: {\n      type: GraphQLString,\n      resolve(parentValue, args, request) {\n        // use `request.session` here\n      },\n    },\n  },\n});\n```\n\n## Providing Extensions\n\nThe GraphQL response allows for adding additional information in a response to a GraphQL query via a field in the response called `\"extensions\"`. This is added by providing an `extensions` function when using `graphqlHTTP`. The function must return a JSON-serializable Object.\n\nWhen called, this is provided an argument which you can use to get information about the GraphQL request:\n\n`{ document, variables, operationName, result, context }`\n\nThis example illustrates adding the amount of time consumed by running the provided query, which could perhaps be used by your development tools.\n\n```ts\nimport { graphqlHTTP } from '@bluesialia/express-graphql';\nimport express from 'express';\n\nconst app = express();\n\nconst extensions = ({\n  document,\n  variables,\n  operationName,\n  result,\n  context,\n}) => {\n  return {\n    runTime: Date.now() - context.startTime,\n  };\n};\n\napp.use(\n  '/graphql',\n  graphqlHTTP((request) => {\n    return {\n      schema: MyGraphQLSchema,\n      context: { startTime: Date.now() },\n      graphiql: true,\n      extensions,\n    };\n  }),\n);\n```\n\nWhen querying this endpoint, it would include this information in the result, for example:\n\n```jsonc\n{\n  \"data\": { /*...*/ },\n  \"extensions\": {\n    \"runTime\": 135\n  }\n}\n```\n\n## Additional Validation Rules\n\nGraphQL's [validation phase](https://spec.graphql.org/#sec-Validation) checks the query to ensure that it can be successfully executed against the schema. The `validationRules` option allows for additional rules to be run during this phase. Rules are applied to each node in an AST representing the query using the Visitor pattern.\n\nA validation rule is a function which returns a visitor for one or more node Types. Below is an example of a validation preventing the specific field name `metadata` from being queried. For more examples, see the [`specifiedRules`](https://github.com/graphql/graphql-js/tree/main/src/validation/rules) in the [graphql-js](https://github.com/graphql/graphql-js) package.\n0\n```ts\nimport { GraphQLError } from 'graphql';\n\nexport function DisallowMetadataQueries(context) {\n  return {\n    Field(node) {\n      const fieldName = node.name.value;\n\n      if (fieldName === 'metadata') {\n        context.reportError(\n          new GraphQLError(\n            `Validation: Requesting the field ${fieldName} is not allowed`,\n          ),\n        );\n      }\n    },\n  };\n}\n```\n\n### Disabling introspection\n\nDisabling introspection does not reflect best practices and does not necessarily make your application any more secure. Nevertheless, disabling introspection is possible by utilizing the `NoSchemaIntrospectionCustomRule` provided by the [graphql-js](https://github.com/graphql/graphql-js) package.\n\n```ts\nimport { NoSchemaIntrospectionCustomRule } from 'graphql';\n\napp.use(\n  '/graphql',\n  graphqlHTTP((request) => {\n    return {\n      schema: MyGraphQLSchema,\n      validationRules: [NoSchemaIntrospectionCustomRule],\n    };\n  }),\n);\n```\n\n## Other Exports\n\n**`getGraphQLParams(request: Request): Promise<GraphQLParams>`**\n\nGiven an HTTP Request, this returns a Promise for the parameters relevant to running a GraphQL request. This function is used internally to handle the incoming request, you may use it directly for building other similar services.\n\n```ts\nimport { getGraphQLParams } from '@bluesialia/express-graphql';\n\ngetGraphQLParams(request).then((params) => {\n  // do something...\n});\n```\n\n## Debugging Tips\n\nDuring development, it's useful to get more information from errors, such as stack traces. Providing a function to `formatErrorFn` enables this:\n\n```ts\nformatErrorFn: (error) => ({\n  message: error.message,\n  locations: error.locations,\n  stack: error.stack ? error.stack.split('\\n') : [],\n  path: error.path,\n});\n```\n","readmeFilename":"README.md"}