{"_id":"@acastellon/graphql","_rev":"5-5c9cd400263ab3b48681795bbfd3bcc0","name":"@acastellon/graphql","dist-tags":{"latest":"1.2.1"},"versions":{"1.0.0":{"name":"@acastellon/graphql","version":"1.0.0","keywords":["graphql","express","ws"],"author":{"name":"Antonio Castellon"},"license":"MIT","_id":"@acastellon/graphql@1.0.0","maintainers":[{"name":"acastellon","email":"antonio@castellon.ch"}],"homepage":"https://github.com/antonio-castellon/module-graphql#readme","bugs":{"url":"https://github.com/antonio-castellon/module-graphql/issues"},"dist":{"shasum":"af20743085b22a8492744f5c5caf1f4287342d6c","tarball":"https://registry.npmjs.org/@acastellon/graphql/-/graphql-1.0.0.tgz","fileCount":17,"integrity":"sha512-owx3KF86dbQrJ/f1O+NIazc6gz9NfvAPJbzctSIMk4fwoNJX+ob91WGPR7vIEJDTe7mQaadOp9j6LuG4xvyckA==","signatures":[{"sig":"MEYCIQCRpQmBZ4dBmnc4zrzZU2bhuJ4bYqgWEKAn6gXg1VSC6wIhALEWCE7YkQzNrJxG62VRFsKd/3X0oQln8jtN7n6HIv7N","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3kDtCRA9TVsSAnZWagAA16AP/2VhtrO9gB/4G9QU+beL\n1RVWWlZOmItDllPHoKKBOhMIEXtffWh0hgZ4V+pgT1cCObJZIpV/eKJjag6e\nM1M8g8FPFJbRDXf+ky5TFxVQUJUmiFPX8zBvQkRoiUFblLNhzowlFoF/kU6C\nMosLiiBPLmyppTPLChodtaLNgDtBwRIr5Yaywxi3W32QRG4vSMqlOE1KGSji\nkkx7p4mZwiPn6XsB+a81TVTe8md6S0y7EM/2YLChTCJR88q2XtNlG1sAGG0k\n8PxWsldmu/72J5PqS+MAzbRLrrkCGi5aiHZI5QRPDlgCr54UyBthyZVUAfL1\ngpfN/T2q7V8PqEYBF1qqSqMiIYbMJz5rJKAHGFfQXWKhkV5Cz5QM8X/R+rkp\nMxvJHw1u/xRGXWSeu4RNxCvJjzZaTRFbg58JpMuNfy62YuBaPv/ASCnMV/yn\nx1Rs4MISGqG4K/qjytR8aIiTZqL9Fj7OG9la8ffbLRv7WzYH2RvKzVvkYAWO\nKW4HBugYzt/z7PatbisKn441clUiR1U22mjdopecgLvVIALYI3nGEPa+6irk\ns03g3Y6R2E4wuYxsqYw47ZqDl48nPkDlzMsPmhpeNxi2c1/h1GSoqTHEYYG6\ngCsyTEal54yOelOZq02WwCxFK5N3Y+nhhw/a8GeRMdlrL/qxzQY9APNarifD\nsvjy\r\n=XHFV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"graphql.js","gitHead":"505c5f34aabf42c4f61b30c1a21e79228731f8c3","scripts":{"start":"set SERVER_ENVIRONMENT=local && node test.js"},"_npmUser":{"name":"acastellon","email":"antonio@castellon.ch"},"repository":{"url":"git+https://github.com/antonio-castellon/module-graphql.git","type":"git"},"_npmVersion":"6.4.1","description":"GraphQL (throw HTTPS) based in Express","directories":{},"_nodeVersion":"10.15.0","dependencies":{"hpp":"^0.2.2","https":"^1.0.0","helmet":"^3.21.1","express":"^4.17.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","graphql-tools":"^4.0.6","@acastellon/vcs":"^1.0.2","express-graphql":"^0.9.0","@acastellon/auth":"^1.0.3","@acastellon/cors":"^1.0.2","@acastellon/ldap":"^1.0.3"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/graphql_1.0.0_1574846700859_0.0930831248786037","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@acastellon/graphql","version":"1.0.1","keywords":["graphql","express","ws"],"author":{"name":"Antonio Castellon"},"license":"MIT","_id":"@acastellon/graphql@1.0.1","maintainers":[{"name":"acastellon","email":"antonio@castellon.ch"}],"homepage":"https://github.com/antonio-castellon/module-graphql#readme","bugs":{"url":"https://github.com/antonio-castellon/module-graphql/issues"},"dist":{"shasum":"77c7e5324a5a0c6cf679f851eca754a17c1c50fc","tarball":"https://registry.npmjs.org/@acastellon/graphql/-/graphql-1.0.1.tgz","fileCount":17,"integrity":"sha512-WDY8l/tGBOKTe3XJHRebK8GuGwzXspTw8U7Tn6Z2UvclcOj0AetJ2Xp85VleX4IfReEwr0Vp8/GVuiSbjA6+kA==","signatures":[{"sig":"MEQCICBX7GHdBRS25aiIDUrlc0diM0BDPr4/rpZK4shaXQ/dAiAs0Q1BvbPlHnKgtwFX2CmBlMM1BshD0wys31lEIwWorw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14080,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd38MUCRA9TVsSAnZWagAAzb8P/j2oBo0SrGz60qHclT+5\nlDe2GmujThoB0WCk6tZO5M77y3F/N5hs1huq3+lFXp/89p5cBO5YqXwlqCqT\nK6kcHv/Ms+Kji+fIthfLTXZh1YJhtJ7zzypkpK0Yn0zkSxh9LKwhHUJj4r51\n5CuPtfoKQgt6LFoMhSKbgQ9pGNV1DkMErDuWH00sv+en4mw7Um6MQp4wIM40\ntabMQiAJdr1LuvdD94Ur+TDrGFZmyE9y6PoVpqv340M3I4OiCZkMNslp+At4\nrYXvxJ+MRu+FlmCGaFgDHxR0gIkAKNKFIf2brA4+BvjLfeFb2TQuKmR6g7Yj\nVwPeE/CK3VfsI9B8fICuMjFz4Mb8pYPMlrUvHnD5z4siHT/mx8fwoqp4UV/D\n9aXq7lwAyEbexxTUfm1Igk4GsKVzk+SqyzIIqIV9B0fjzpn86J0KLoeXLXwE\nrf/rrM2QTt3e/CuAzcN8FJKNS2XNTxoNe79F2ZsIBA/iHVI5yehTT6IsruZY\nN/VYvWA7g8wcUnVIZa3Yp1PB0XZMe0aVuX5tmshTZ9MbE59GwTRhuoE/KeNR\ng8QUu1v7c/+rpHMgx7zgb9T8a276fv/C3oRXhZYp4PCjPV84IMB0c+0GWWY+\n95fzRM24P/gblKriNzui41BfQAfkZkvL6zgz4DctYdRXC+sqcdRVb7o/sP3M\nuKb7\r\n=YgSl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"graphql.js","gitHead":"c3d1cd9a5614e7cecf23bd83a6de3f2916c9fe00","scripts":{"start":"set SERVER_ENVIRONMENT=local && node test.js"},"_npmUser":{"name":"acastellon","email":"antonio@castellon.ch"},"repository":{"url":"git+https://github.com/antonio-castellon/module-graphql.git","type":"git"},"_npmVersion":"6.12.1","description":"GraphQL (throw HTTPS) based in Express","directories":{},"_nodeVersion":"12.13.1","dependencies":{"hpp":"^0.2.2","https":"^1.0.0","helmet":"^3.21.1","express":"^4.17.1","body-parser":"^1.19.0","cookie-parser":"^1.4.4","graphql-tools":"^4.0.6","@acastellon/vcs":"^1.0.2","express-graphql":"^0.9.0","@acastellon/auth":"^1.0.6","@acastellon/cors":"^1.0.2","@acastellon/ldap":"^1.0.3"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/graphql_1.0.1_1574945555804_0.9338964337755629","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"@acastellon/graphql","version":"1.2.0","keywords":["graphql","express","ws"],"author":{"name":"Antonio Castellon"},"license":"MIT","_id":"@acastellon/graphql@1.2.0","maintainers":[{"name":"acastellon","email":"antonio@castellon.ch"}],"homepage":"https://github.com/antonio-castellon/module-graphql#readme","bugs":{"url":"https://github.com/antonio-castellon/module-graphql/issues"},"dist":{"shasum":"9e3c330b5dc2ac6e8fc8fc0adf3a1bddc9374a0a","tarball":"https://registry.npmjs.org/@acastellon/graphql/-/graphql-1.2.0.tgz","fileCount":15,"integrity":"sha512-GLdTVCCuL/1um4sNFUV0UzFMaiwWw5W2W4JbhIxdz4f2YFSYSbgqtHDJZfv7PCXto0Gxq4t/nwyPA+HtSCLsWw==","signatures":[{"sig":"MEUCIQC0UDS6xjW9CLXVD/qWcwoGy8DAANdrjiFVS1vStoryowIgC1ijH5G4gfafGpajZyZoBwcPg7DwaTFNDS+SCZiWuk8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10390},"main":"graphql.js","engines":{"node":">=18.0.0"},"gitHead":"ced5f7065ab3982b2da76956613208d2f1775f6a","scripts":{"test":"node test.js","start":"node test.js"},"_npmUser":{"name":"acastellon","email":"antonio@castellon.ch"},"repository":{"url":"git+https://github.com/antonio-castellon/module-graphql.git","type":"git"},"_npmVersion":"10.9.2","description":"GraphQL (HTTPS) based in Express","directories":{},"_nodeVersion":"22.14.0","dependencies":{"hpp":"^0.2.2","helmet":"^7.1.0","express":"^4.18.2","cookie-parser":"^1.4.4","@acastellon/vcs":"^1.3.0","express-graphql":"^0.12.0","@acastellon/auth":"^2.2.0","@acastellon/cors":"^1.2.0","@acastellon/ldap":"^1.3.0","@graphql-tools/schema":"^8.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/graphql_1.2.0_1780483701276_0.536669102947894","host":"s3://npm-registry-packages-npm-production"}},"1.2.1":{"name":"@acastellon/graphql","version":"1.2.1","description":"GraphQL (HTTPS) based in Express","main":"graphql.js","scripts":{"start":"node test.js","test":"node test.js"},"repository":{"type":"git","url":"git+https://github.com/antonio-castellon/module-graphql.git"},"keywords":["graphql","express","ws"],"dependencies":{"@acastellon/auth":"^2.3.0","@acastellon/cors":"^1.2.0","@acastellon/ldap":"^1.3.0","@acastellon/vcs":"^1.3.0","@graphql-tools/schema":"^8.0.0","cookie-parser":"^1.4.4","express":"^4.18.2","express-graphql":"^0.12.0","helmet":"^7.1.0","hpp":"^0.2.2"},"author":{"name":"Antonio Castellon"},"license":"MIT","bugs":{"url":"https://github.com/antonio-castellon/module-graphql/issues"},"homepage":"https://github.com/antonio-castellon/module-graphql#readme","engines":{"node":">=18.0.0"},"_id":"@acastellon/graphql@1.2.1","gitHead":"ced5f7065ab3982b2da76956613208d2f1775f6a","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-mbcTsYKivc06vC+FknEx9bzqL4dggydcbBXNiK7jZCYrlvPQV5v+UP7o1zfMusPMWfUquyXxTH+j5P+A9rYyAw==","shasum":"e03dac208f1da8027f24017b4b0e69bf2c568651","tarball":"https://registry.npmjs.org/@acastellon/graphql/-/graphql-1.2.1.tgz","fileCount":15,"unpackedSize":10673,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEIGhbHj/QDsikM1baKz2m8uVSEveuebjUZVJGhORX4cAiEAh4sMG716pQMN+aHTK+Es7GVKZkvEa7nq0hd/tpBzAWA="}]},"_npmUser":{"name":"acastellon","email":"antonio@castellon.ch"},"directories":{},"maintainers":[{"name":"acastellon","email":"antonio@castellon.ch"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/graphql_1.2.1_1781761838488_0.8959629490597942"},"_hasShrinkwrap":false}},"time":{"created":"2019-11-27T09:25:00.628Z","modified":"2026-06-18T05:50:38.771Z","1.0.0":"2019-11-27T09:25:00.950Z","1.0.1":"2019-11-28T12:52:35.947Z","1.2.0":"2026-06-03T10:48:21.398Z","1.2.1":"2026-06-18T05:50:38.655Z"},"bugs":{"url":"https://github.com/antonio-castellon/module-graphql/issues"},"author":{"name":"Antonio Castellon"},"license":"MIT","homepage":"https://github.com/antonio-castellon/module-graphql#readme","keywords":["graphql","express","ws"],"repository":{"type":"git","url":"git+https://github.com/antonio-castellon/module-graphql.git"},"description":"GraphQL (HTTPS) based in Express","maintainers":[{"name":"acastellon","email":"antonio@castellon.ch"}],"readme":"# @acastellon/graphql\r\n\r\nGraphQL (HTTPS) interface based in Express + express-graphql + @graphql-tools/schema.\r\n\r\n**Note:** `express-graphql` is deprecated (last release 0.12). Consider migrating to `graphql-http` or Yoga in future updates for this module. The schema loading supports a directory of .graphql + .resolvers.js files plus base _.* files.\r\n\r\nSee config templates for SERVER and AUTH setup (requires certs for HTTPS).\r\n\r\n## Usage\r\n\r\n```js\r\nconst SERVER = require('./config.server.js');\r\nconst AUTH = require('./config.auth.js'); // Auth now includes header sanitization + mTLS service auth (security hardening)\r\nconst graphql = require('@acastellon/graphql')(SERVER, AUTH);\r\ngraphql.run(() => { console.log('GraphQL server running'); });\r\n```\r\n\r\n## API / Module surface\r\n\r\nConstructor returns `{ run(cb?) }`.\r\n\r\n- `run(cb)`: Starts the HTTPS server (assumes CERTIFICATION_PATH). Listens on SERVER.PORT or process.env.PORT.\r\n\r\nInternally loads schemas via `./api.js` (merges base _.graphql + directory *.graphql + corresponding * .resolvers.js using Object.assign).\r\n\r\nThe returned model from api.js is `{ schema, resolvers }` passed to graphqlHTTP.\r\n\r\n**Minimal example (self-contained):**\r\n\r\n```js\r\nconst SERVER = {\r\n  CERTIFICATION_PATH: '/path/to/certs',\r\n  PORT: 4000,\r\n  WHITELIST: './whitelist',\r\n  SCHEMA_PATH: './schema'  // directory with .graphql + .resolvers.js\r\n};\r\n\r\nconst AUTH = require('./config.auth.js'); // Auth now includes header sanitization + mTLS service auth (security hardening)\r\n\r\nconst graphql = require('@acastellon/graphql')(SERVER, AUTH);\r\n\r\ngraphql.run(() => {\r\n  console.log('GraphQL server is running at https://localhost:4000');\r\n});\r\n```\r\n\r\n## License\r\n\r\nMIT\r\n","readmeFilename":"README.md"}