{"_id":"@manifoldco/graphql-gen","_rev":"32-33e202333b9a36b56ee8acb7da29bd66","name":"@manifoldco/graphql-gen","dist-tags":{"latest":"1.1.6","next":"1.1.6-0"},"versions":{"1.1.0-alpha.0":{"name":"@manifoldco/graphql-gen","version":"1.1.0-alpha.0","main":"dist/index.js","bin":{"graphql-gen":"./bin/graphql-gen.js"},"author":{"name":"dangodev"},"license":"ISC","bugs":{"url":"https://github.com/manifoldco/swagger-to-graphql/issues"},"homepage":"https://github.com/manifoldco/swagger-to-graphql#readme","repository":{"type":"git","url":"git+https://github.com/manifoldco/swagger-to-graphql.git"},"scripts":{"build":"node scripts/build","pregenerate":"npm run build","generate":"node scripts/generate","test":"jest"},"dependencies":{"chalk":"^2.4.2","fs-extra":"^7.0.1","meow":"^5.0.0","prettier":"^1.16.1"},"devDependencies":{"@types/glob":"^7.1.1","@types/jest":"^23.3.13","@types/js-yaml":"^3.12.0","@types/prettier":"^1.15.2","glob":"^7.1.3","jest":"^23.6.0","js-yaml":"^3.12.1","rollup":"^1.1.2","rollup-plugin-terser":"^4.0.2","rollup-plugin-typescript":"^1.0.0","ts-jest":"^23.10.5","tslib":"^1.9.3","typescript":"^3.2.4"},"peerDependencies":{"prettier":"^1.0.0"},"gitHead":"ced6668af5b7ec8ec8570e7493fa6d345728b508","description":"Node client for generating crude GraphQL specs from Swagger OpenAPI. Currently only supports Swagger v2. 💅 Prettifies output via [prettier][prettier].","_id":"@manifoldco/graphql-gen@1.1.0-alpha.0","_nodeVersion":"11.6.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-JL7cW/HkYZNeSlxqA7wZD0mqX7uXXt3jGYRy71Kl3YOmb3zz69ZNSDFLEMu/Kr/UEd7KkY9B7Q19UZmOrjsxSA==","shasum":"550fe3832bf7ebd9719d98d4276324104aa8342f","tarball":"https://registry.npmjs.org/@manifoldco/graphql-gen/-/graphql-gen-1.1.0-alpha.0.tgz","fileCount":5,"unpackedSize":15240,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUNOKCRA9TVsSAnZWagAAUQUQAIrRDQoBHOnUAQnJWOY4\nZE6X5tJwKXUYRtGvtHlUONpp78BwlWGcnsf8lFIgI9RSSZh52GUy2S1dY65o\nH3OZ/v9xar8xam0ZcPCGOotzQKMVdEt02oc3DF2c0n5ptbOiSSKHusCg+xjV\np3s3fucJx3G+9EAcyl8RDmcOaAfGJ5yE0B/WuLN8yG/JaFNcT7ZxZaWucaH/\nC458SFAaCqtWzz4zfhnGw+Kv7Ldg2U+rePI4VBc34JsTRWsETHpV0qgVknsj\nIZeaZODi8st4Ab+4FKrkqDtY3njjQsb0QMZVii1oPy2moPocOcQTJVeUixOq\n3wKsM1NBTVpm9RhbDo34SLuQuXiv8WmUi9sp2q0uHXowPMUrdekoiaIC0vVx\nJrPgvG9DFQtsbAwQhAsSvQDFo2cavdZiP0+XIZ+XpXJbgjzh7bGKAgE6AIvw\nzOBzUkrw46Wq35iQconZw5Lb8/pJSalimWzGaofhOTn99+JpUvpuCO0L38ci\naoMGZ+m7QOWYIgFcdycFdxFli04V2XD/LAawcOkvu9OMd/BHbgA8o81JnTOE\n9AFNuJdMcbXwPFENvQnvQwLxUnymwY31yyGUIlQwD5f7ZApJwK0o1uibfI+J\nyDFQiGIDuNte5F8H67OsekCh1il5C7hUegVD5pDr8LmyrR8FD6fM/Kh9lZrg\nlkPV\r\n=8p2Z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGNyG2dGWyVcKP06+9HOCXAJeX6/j0he6+pHp/jU7aeGAiB4Ne36pVV/1LAzVHAhfeeuHcyRK22qvYAqR7HC5l5o9A=="}]},"maintainers":[{"name":"davidleger95","email":"davidleger95@me.com"},{"name":"enmand","email":"enmand@gmail.com"},{"name":"tim-speed","email":"iceczd@gmail.com"},{"name":"minivera","email":"gstpierre01@gmail.com"},{"name":"terrysmith","email":"terry@designcollider.com"},{"name":"ntibaldi92","email":"nicole@manifold.co"},{"name":"drewpowers","email":"drew@pow.rs"},{"name":"sslotsky","email":"saxosamo@gmail.com"},{"name":"markjamieson","email":"markjamieson0@gmail.com"},{"name":"garyposter","email":"gary@modernsongs.com"},{"name":"ianlivingstone","email":"ianrlivingstone@gmail.com"},{"name":"jeffandersen","email":"jeffandersen@gmail.com"},{"name":"jbowes","email":"jbowes@repl.ca"},{"name":"creager","email":"matthew.creager@gmail.com"},{"name":"davehyndman","email":"dave@manifold.co"}],"_npmUser":{"name":"drewpowers","email":"drew@pow.rs"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-gen_1.1.0-alpha.0_1548800905449_0.4639300606176542"},"_hasShrinkwrap":false},"1.1.0-alpha.2":{"name":"@manifoldco/graphql-gen","version":"1.1.0-alpha.2","main":"dist/index.js","bin":{"graphql-gen":"./bin/cli.js"},"author":{"name":"dangodev"},"license":"ISC","bugs":{"url":"https://github.com/manifoldco/swagger-to-graphql/issues"},"homepage":"https://github.com/manifoldco/swagger-to-graphql#readme","repository":{"type":"git","url":"git+https://github.com/manifoldco/swagger-to-graphql.git"},"scripts":{"build":"node scripts/build","pregenerate":"npm run build","generate":"node scripts/generate","test":"jest"},"dependencies":{"chalk":"^2.4.2","fs-extra":"^7.0.1","meow":"^5.0.0","prettier":"^1.16.1"},"devDependencies":{"@types/fs-extra":"^5.0.4","@types/glob":"^7.1.1","@types/jest":"^23.3.13","@types/js-yaml":"^3.12.0","@types/prettier":"^1.15.2","glob":"^7.1.3","jest":"^23.6.0","js-yaml":"^3.12.1","rollup":"^1.1.2","rollup-plugin-terser":"^4.0.2","rollup-plugin-typescript":"^1.0.0","ts-jest":"^23.10.5","tslib":"^1.9.3","typescript":"^3.2.4"},"peerDependencies":{"prettier":"^1.0.0"},"readme":"# ⚛️ graphql-gen\n\nNode client for generating crude GraphQL specs from Swagger OpenAPI.\nCurrently only supports Swagger v2. 💅 Prettifies output via [prettier][prettier].\n\n#### Support\n\n| GraphQL Features                     |     |\n| :----------------------------------- | :-: |\n| Enum                                 | ✅  |\n| ID                                   | ✅  |\n| Implements (`allOf`)                 | ✅  |\n| Non-nullable                         | ✅  |\n| Primitives (string, boolean, number) | ✅  |\n| Query                                | 🚫  |\n| Mutation                             | 🚫  |\n\n## Usage\n\n### CLI\n\n```\nnpx @manifoldco/graphql-gen api.yaml --output api.graphql\n```\n\nThis will save a `api.graphql` file in the current folder.\n\n### Node\n\n```\nnpm i --save-dev @manifoldco/graphql-gen prettier\n```\n\n```js\nconst graphqlGen = require('@manifoldco/swagger-to-graphql');\n\ngraphqlGen(spec, [options]);\n```\n\n`spec` must be in JSON format. For an example of converting YAML to JSON, see\nthe [generate.js](./scripts/generate.js) script.\n\n### Options\n\n| Name      | Default  | Description                                                |\n| :-------- | :------- | :--------------------------------------------------------- |\n| `output`  | (stdout) | Where should the output file be saved?                     |\n| `swagger` | `2`      | Which Swagger version to use. Currently only supports `2`. |\n\n## FAQ\n\n#### Why does this exist apart from [yarax/swagger-to-graphql](https://github.com/yarax/swagger-to-graphql) ?\n\nThat didn’t work for our Swagger 2.0 specs 🤷. While normally a PR is the best\ncourse of action, this repo exists because it was less effort to build something\nthat works for us than rewrite a popular library (it wasn’t a quick fix).\n\n#### Why aren’t Queries and Mutations generated from the OpenAPI spec?\n\nWhile it’s possible to generate _something_ from OpenAPI, it’s intentionally\nomitted from autogeneration here. Queries and Mutations are best left up to\nhumans, so you can determine what developers should access, and how.\nUltimately generating these will always fall short of how real humans\ncould—and should—use your GraphQL endpoint.\n\n## Notes\n\nGraphQL is a spec, just like OpenAPI. For this reason, automatic generation\nisn’t ideal long-term. This library should probably be used as a\n**first-pass** to migrate an OpenAPI endpoint to GraphQL. This can generate\ntypes, but can’t intelligently generate the best queries and mutations for\nyour specific endpoint.\n\nA common example of this: Swagger has a concept of `format: datetime`.\nGraphQL cares about this, but doesn’t assume the formatting. Is this UNIX\ntime? ISO? Are there timezones? Types can be so much more descriptive than\nmere `string` or `int`, and GraphQL gives you the tools to declare this\nyourself.\n\n[prettier]: https://github.com/prettier/prettier\n","readmeFilename":"README.md","gitHead":"fa26c21ec67b9935c0d4ed4b7dad90bf1ae7c33e","description":"Node client for generating crude GraphQL specs from Swagger OpenAPI. Currently only supports Swagger v2. 💅 Prettifies output via [prettier][prettier].","_id":"@manifoldco/graphql-gen@1.1.0-alpha.2","_nodeVersion":"11.6.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-OhWYZI+45qsnMvdLBjR0zfYwGTodMrB9QpjBHhMwDEldkMauKpDqHzTdMHGiPscKjJwio44aLQOVARY4uCOZTw==","shasum":"c43a19c10921152012754a01ad214f84783b3ca6","tarball":"https://registry.npmjs.org/@manifoldco/graphql-gen/-/graphql-gen-1.1.0-alpha.2.tgz","fileCount":5,"unpackedSize":15358,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUOE0CRA9TVsSAnZWagAAM1IP/jkQn0bhrXvae1YCprDF\np3aVTyJWH54VRZFb+y30Hv2nVf5Eh9ZkIIgbI4nzkyMYTF0zk4w9hM0Ey0Gw\nRsvguJmEAb5JS98TljHk4GYYtSPI6M4FaEertPpBpFAXOHfGVhtCpQZZHi9f\nHMXdAfd/Y8w759OeUl4gG+36H8errx80UESbtOVhAh7de08KKPx8N+2ZB5XD\nxfpMRFDvhY+HXlMFhQ7pDwSgYtPiekrbua+d0oSXlDcnA64mxFHzyYS+W/Cj\nEIHfELYYpjqMqb187A4JwB8Jq+moHnweyu5QD2reh6A/Bc9cj0uOTQQcTez9\nX//5gkAAdcX/dazQcE0f+pYU6YtqCB4iHaYs3fFIfTbCCkMqjFGC1KHn73/F\np6Ru6Sa0zwEzKxw3txewMSFh8+3Or86bX5zm22lCnGO1ma2GoZD/16tzSM0D\nBn6b5QCdpy9IA8DJ8LzedMrpZPXh+sbUhHtQge69FOHUFeNN1zw5eqLUs3LG\nqnZwrenkv6bm0iph7MfleD89PDVHmoxVGV+PZBZ4tDev42tIKS7ejFWJRUdg\nSAgLlB0of6rz2T7Iu2Q8Omh9d0eI3lL+CGL9PCkExD4cX55ktO0nWXVMiiH3\n8MOuQundiQ8VyUrMo/9rAuWxmBwymXBzWFDipF8WmY0odpRwWMo6JPgYRpNc\nb8dO\r\n=IqWb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHq4vs4DHT2jTSElXYnJHv/mHxGEkztYj0hMOkuioJjaAiEA6Q15YZr29rCC4ybCVOHSDuQsmZyhv/1YxrRT9aR/Ogs="}]},"maintainers":[{"name":"creager","email":"matthew.creager@gmail.com"},{"name":"davehyndman","email":"dave@manifold.co"},{"name":"davidleger95","email":"davidleger95@me.com"},{"name":"drewpowers","email":"drew@pow.rs"},{"name":"enmand","email":"enmand@gmail.com"},{"name":"garyposter","email":"gary@modernsongs.com"},{"name":"ianlivingstone","email":"ianrlivingstone@gmail.com"},{"name":"jbowes","email":"jbowes@repl.ca"},{"name":"jeffandersen","email":"jeffandersen@gmail.com"},{"name":"markjamieson","email":"markjamieson0@gmail.com"},{"name":"minivera","email":"gstpierre01@gmail.com"},{"name":"ntibaldi92","email":"nicole@manifold.co"},{"name":"sslotsky","email":"saxosamo@gmail.com"},{"name":"terrysmith","email":"terry@designcollider.com"},{"name":"tim-speed","email":"iceczd@gmail.com"}],"_npmUser":{"name":"drewpowers","email":"drew@pow.rs"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-gen_1.1.0-alpha.2_1548804403686_0.5416893310131574"},"_hasShrinkwrap":false},"1.1.0-alpha.3":{"name":"@manifoldco/graphql-gen","version":"1.1.0-alpha.3","main":"dist/index.js","bin":{"graphql-gen":"./bin/cli.js"},"author":{"name":"dangodev"},"license":"ISC","bugs":{"url":"https://github.com/manifoldco/swagger-to-graphql/issues"},"homepage":"https://github.com/manifoldco/swagger-to-graphql#readme","repository":{"type":"git","url":"git+https://github.com/manifoldco/swagger-to-graphql.git"},"scripts":{"build":"node scripts/build","pregenerate":"npm run build","generate":"node scripts/generate","test":"jest"},"dependencies":{"chalk":"^2.4.2","fs-extra":"^7.0.1","js-yaml":"^3.12.1","meow":"^5.0.0","prettier":"^1.16.1"},"devDependencies":{"@types/fs-extra":"^5.0.4","@types/glob":"^7.1.1","@types/jest":"^23.3.13","@types/js-yaml":"^3.12.0","@types/prettier":"^1.15.2","glob":"^7.1.3","jest":"^23.6.0","rollup":"^1.1.2","rollup-plugin-terser":"^4.0.2","rollup-plugin-typescript":"^1.0.0","ts-jest":"^23.10.5","tslib":"^1.9.3","typescript":"^3.2.4"},"peerDependencies":{"prettier":"^1.0.0"},"readme":"# ⚛️ graphql-gen\n\nNode client for generating crude GraphQL specs from Swagger OpenAPI.\nCurrently only supports Swagger v2. 💅 Prettifies output via [prettier][prettier].\n\n#### Support\n\n| GraphQL Features                     |     |\n| :----------------------------------- | :-: |\n| Enum                                 | ✅  |\n| ID                                   | ✅  |\n| Implements (`allOf`)                 | ✅  |\n| Non-nullable                         | ✅  |\n| Primitives (string, boolean, number) | ✅  |\n| Query                                | 🚫  |\n| Mutation                             | 🚫  |\n\n## Usage\n\n### CLI\n\n```\nnpx @manifoldco/graphql-gen api.yaml --output api.graphql\n```\n\nThis will save a `api.graphql` file in the current folder.\n\n### Node\n\n```\nnpm i --save-dev @manifoldco/graphql-gen prettier\n```\n\n```js\nconst graphqlGen = require('@manifoldco/swagger-to-graphql');\n\ngraphqlGen(spec, [options]);\n```\n\n`spec` must be in JSON format. For an example of converting YAML to JSON, see\nthe [generate.js](./scripts/generate.js) script.\n\n### Options\n\n| Name      | Default  | Description                                                |\n| :-------- | :------- | :--------------------------------------------------------- |\n| `output`  | (stdout) | Where should the output file be saved?                     |\n| `swagger` | `2`      | Which Swagger version to use. Currently only supports `2`. |\n\n## FAQ\n\n#### Why does this exist apart from [yarax/swagger-to-graphql](https://github.com/yarax/swagger-to-graphql) ?\n\nThat didn’t work for our Swagger 2.0 specs 🤷. While normally a PR is the best\ncourse of action, this repo exists because it was less effort to build something\nthat works for us than rewrite a popular library (it wasn’t a quick fix).\n\n#### Why aren’t Queries and Mutations generated from the OpenAPI spec?\n\nWhile it’s possible to generate _something_ from OpenAPI, it’s intentionally\nomitted from autogeneration here. Queries and Mutations are best left up to\nhumans, so you can determine what developers should access, and how.\nUltimately generating these will always fall short of how real humans\ncould—and should—use your GraphQL endpoint.\n\n## Notes\n\nGraphQL is a spec, just like OpenAPI. For this reason, automatic generation\nisn’t ideal long-term. This library should probably be used as a\n**first-pass** to migrate an OpenAPI endpoint to GraphQL. This can generate\ntypes, but can’t intelligently generate the best queries and mutations for\nyour specific endpoint.\n\nA common example of this: Swagger has a concept of `format: datetime`.\nGraphQL cares about this, but doesn’t assume the formatting. Is this UNIX\ntime? ISO? Are there timezones? Types can be so much more descriptive than\nmere `string` or `int`, and GraphQL gives you the tools to declare this\nyourself.\n\n[prettier]: https://github.com/prettier/prettier\n","readmeFilename":"README.md","gitHead":"7b326e0fc3e160e0e81c0ad25560c09998095ced","description":"Node client for generating crude GraphQL specs from Swagger OpenAPI. Currently only supports Swagger v2. 💅 Prettifies output via [prettier][prettier].","_id":"@manifoldco/graphql-gen@1.1.0-alpha.3","_nodeVersion":"11.6.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-vuWnBjsVkm8i9SCxo6M636e7RXNGBWZYagDv+dlDE4jaKGUAFj6GlhQqLLwVJcqNN+f0nbi2HEWM13Bc/8yrag==","shasum":"a5fee94b56b55c7606ff10f13deac043f1045afa","tarball":"https://registry.npmjs.org/@manifoldco/graphql-gen/-/graphql-gen-1.1.0-alpha.3.tgz","fileCount":5,"unpackedSize":15358,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUOGmCRA9TVsSAnZWagAAI7wP/20mn685h/+PaVd1F1/l\n2ZW6lCxRl7WugMZ53GWIXpM1wO5bdBr+eaWA/qYfxmR5AQJa1VIq3bSv95uZ\nDracw7PSujt9bFIjHtxVnssbiaRVU/kzxqQhoNmHeAP+t731wMfW2EVmQ/Kg\n2UBlh06x/0Neqj6z8fYy4y2d+EJ0Z28CG1EX4OdQmophm4ufN7R19XVtc/oL\n8x9k2G49yip94VvgEWU6JPkR/lp7zAz3ClBCMBWIBeLjd4aXSI/KsuokIuXh\nHEFE7KAmetesqEZbSQI2Cjb4o0pb2Va8y9WkmQODG+x9JN1twU8rSs0mjnZr\nmaWJ+43pj2PjI3T0mqt/lsEhmRan3uSYguWYjPe85YymsSfoRKUe1U5UPVQ/\nxY1ffTL+MVD1xo3L8W705TKJy9rkYq88AlqcqF0t2neXjh1ASaEItG/+EZ91\nHyEay8QzqURDGocpANNnk4Qbz0mGDhMXwxyBklhwzbBdLpYz2oHzI/8P2Hv6\nrPMM1H4AAdCRUs71JpMpr/0YGEHUB1oeWAvFzwdktVJ/hoKLgzJEVtAJ9BSO\nzPza8wJMYDgIxRWgxS9m8Tfak9msWq5vnbO2VT+2e92gBH9fnCuW/84rJpYw\n3rNO6VN0qmSTr68/lrD8sHWRMQR4SB3Yf5amhMJsk6tdawvT5N6G49rArHwm\nKO2X\r\n=2vmx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDJspzyvnpnPFt7/cBmkFE3PTjcaC5krK8t8GATgGTCHwIhAKWVTZnGKcHsy9eAoWBZzpgDL6MePVjwhm9kK/f/1DzP"}]},"maintainers":[{"name":"creager","email":"matthew.creager@gmail.com"},{"name":"davehyndman","email":"dave@manifold.co"},{"name":"davidleger95","email":"davidleger95@me.com"},{"name":"drewpowers","email":"drew@pow.rs"},{"name":"enmand","email":"enmand@gmail.com"},{"name":"garyposter","email":"gary@modernsongs.com"},{"name":"ianlivingstone","email":"ianrlivingstone@gmail.com"},{"name":"jbowes","email":"jbowes@repl.ca"},{"name":"jeffandersen","email":"jeffandersen@gmail.com"},{"name":"markjamieson","email":"markjamieson0@gmail.com"},{"name":"minivera","email":"gstpierre01@gmail.com"},{"name":"ntibaldi92","email":"nicole@manifold.co"},{"name":"sslotsky","email":"saxosamo@gmail.com"},{"name":"terrysmith","email":"terry@designcollider.com"},{"name":"tim-speed","email":"iceczd@gmail.com"}],"_npmUser":{"name":"drewpowers","email":"drew@pow.rs"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-gen_1.1.0-alpha.3_1548804518085_0.6187091650407006"},"_hasShrinkwrap":false},"1.1.0-alpha.4":{"name":"@manifoldco/graphql-gen","version":"1.1.0-alpha.4","main":"dist/index.js","bin":{"graphql-gen":"./bin/cli.js"},"author":{"name":"dangodev"},"license":"ISC","bugs":{"url":"https://github.com/manifoldco/swagger-to-graphql/issues"},"homepage":"https://github.com/manifoldco/swagger-to-graphql#readme","repository":{"type":"git","url":"git+https://github.com/manifoldco/swagger-to-graphql.git"},"scripts":{"build":"node scripts/build","pregenerate":"npm run build","generate":"node scripts/generate","test":"jest"},"dependencies":{"chalk":"^2.4.2","fs-extra":"^7.0.1","js-yaml":"^3.12.1","meow":"^5.0.0","prettier":"^1.16.1"},"devDependencies":{"@types/fs-extra":"^5.0.4","@types/glob":"^7.1.1","@types/jest":"^23.3.13","@types/js-yaml":"^3.12.0","@types/prettier":"^1.15.2","glob":"^7.1.3","jest":"^23.6.0","rollup":"^1.1.2","rollup-plugin-terser":"^4.0.2","rollup-plugin-typescript":"^1.0.0","ts-jest":"^23.10.5","tslib":"^1.9.3","typescript":"^3.2.4"},"peerDependencies":{"prettier":"^1.0.0"},"readme":"# ⚛️ graphql-gen\n\nNode client for generating crude GraphQL specs from Swagger OpenAPI.\nCurrently only supports Swagger v2. 💅 Prettifies output via [prettier][prettier].\n\n#### Support\n\n| GraphQL Features                     |     |\n| :----------------------------------- | :-: |\n| Enum                                 | ✅  |\n| ID                                   | ✅  |\n| Implements (`allOf`)                 | ✅  |\n| Non-nullable                         | ✅  |\n| Primitives (string, boolean, number) | ✅  |\n| Query                                | 🚫  |\n| Mutation                             | 🚫  |\n\n## Usage\n\n### CLI\n\n```\nnpx @manifoldco/graphql-gen api.yaml --output api.graphql\n```\n\nThis will save a `api.graphql` file in the current folder.\n\n### Node\n\n```\nnpm i --save-dev @manifoldco/graphql-gen prettier\n```\n\n```js\nconst graphqlGen = require('@manifoldco/swagger-to-graphql');\n\ngraphqlGen(spec, [options]);\n```\n\n`spec` must be in JSON format. For an example of converting YAML to JSON, see\nthe [generate.js](./scripts/generate.js) script.\n\n### Options\n\n| Name      | Default  | Description                                                |\n| :-------- | :------- | :--------------------------------------------------------- |\n| `output`  | (stdout) | Where should the output file be saved?                     |\n| `swagger` | `2`      | Which Swagger version to use. Currently only supports `2`. |\n\n## FAQ\n\n#### Why does this exist apart from [yarax/swagger-to-graphql](https://github.com/yarax/swagger-to-graphql) ?\n\nThat didn’t work for our Swagger 2.0 specs 🤷. While normally a PR is the best\ncourse of action, this repo exists because it was less effort to build something\nthat works for us than rewrite a popular library (it wasn’t a quick fix).\n\n#### Why aren’t Queries and Mutations generated from the OpenAPI spec?\n\nWhile it’s possible to generate _something_ from OpenAPI, it’s intentionally\nomitted from autogeneration here. Queries and Mutations are best left up to\nhumans, so you can determine what developers should access, and how.\nUltimately generating these will always fall short of how real humans\ncould—and should—use your GraphQL endpoint.\n\n## Notes\n\nGraphQL is a spec, just like OpenAPI. For this reason, automatic generation\nisn’t ideal long-term. This library should probably be used as a\n**first-pass** to migrate an OpenAPI endpoint to GraphQL. This can generate\ntypes, but can’t intelligently generate the best queries and mutations for\nyour specific endpoint.\n\nA common example of this: Swagger has a concept of `format: datetime`.\nGraphQL cares about this, but doesn’t assume the formatting. Is this UNIX\ntime? ISO? Are there timezones? Types can be so much more descriptive than\nmere `string` or `int`, and GraphQL gives you the tools to declare this\nyourself.\n\n[prettier]: https://github.com/prettier/prettier\n","readmeFilename":"README.md","gitHead":"3f037abff21b43b5b9ea8e7131081ed44d0d807a","description":"Node client for generating crude GraphQL specs from Swagger OpenAPI. Currently only supports Swagger v2. 💅 Prettifies output via [prettier][prettier].","_id":"@manifoldco/graphql-gen@1.1.0-alpha.4","_nodeVersion":"11.6.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-StnL2FDU5uLd6JrNLzqaxIW3IbCHfvAobzMLjlmJ+/IP3dj7/MAUTMrZWmbBOpKtfUzWdrPevIy9zUQLCiRA9A==","shasum":"c21580a25d6fe09fa83858c373cf04909442dcfc","tarball":"https://registry.npmjs.org/@manifoldco/graphql-gen/-/graphql-gen-1.1.0-alpha.4.tgz","fileCount":5,"unpackedSize":15286,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUOINCRA9TVsSAnZWagAAx0AP/jrgYELRl0cJ76eHNPK+\n+r1GJCX8kGvaHV49GdIPm3oRVF2xNkA6HSEcCo0tdGufz+uN1LdNjr2C0IP0\n0bWyQwxd71muEbF0ouesRvEz/ver/3mF5NUzkW76E7/8aaXuMg7kFENScHPx\nV4gmEpzxq5Uz8O8ny+JYczfETSqJnoltqQpY6SkqdvsZYT0OK5g/XbvnoYql\nqIg3US7pq653/qh+nhyjPZiY6lng7gej+z3c/HXKSVuz1mFez9PZgIjrnK0B\n4rcr+n9P0w/C+IwTXdLMeiaLCMNCnqvZ6oOHC41hr2LBsRfj+Zj3eGhzNmSV\nMIcdTZUqxDaxvqcm11fl2lUUqgHqk8lx87j2x1Fsawp5fGAy1gLkaCzaGH/J\nsewRIp/vuIpIlcbwiu22ylBP/ENoLdit8ivstel4RI6qst9LjQMIwv7rsQw4\nbEHgp4uSaeXEK7dfDHGKLOKSuufyehw0IqlM+qGOiWcyvz0gj+D66h/mn4ZY\nEHmOSz/SDaTDgr0NCRbpJMhRqMFzy6IIspi5DdHEH/U9TJBpFDE9bKTKVa0O\nSIqifrYZtlgpA/Ne+sfELw+4vs5FmF8m6m53bB458ZXEVE01wEASTSFJ7elr\nC65wvy2d5pRL1FGOjPL00RpjmYn13KAcQNI9dugxiz3+beGcRhBFmF1x7HBA\nVfqK\r\n=l2MB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCy/5S/y9s0cS2XiOcaMDUqFTh7EOEc0LCQmD/opvOhcQIgTniniNeD5TLPnGDSg9BuYJqCM/NkckuZ94DCZWo5BwI="}]},"maintainers":[{"name":"creager","email":"matthew.creager@gmail.com"},{"name":"davehyndman","email":"dave@manifold.co"},{"name":"davidleger95","email":"davidleger95@me.com"},{"name":"drewpowers","email":"drew@pow.rs"},{"name":"enmand","email":"enmand@gmail.com"},{"name":"garyposter","email":"gary@modernsongs.com"},{"name":"ianlivingstone","email":"ianrlivingstone@gmail.com"},{"name":"jbowes","email":"jbowes@repl.ca"},{"name":"jeffandersen","email":"jeffandersen@gmail.com"},{"name":"markjamieson","email":"markjamieson0@gmail.com"},{"name":"minivera","email":"gstpierre01@gmail.com"},{"name":"ntibaldi92","email":"nicole@manifold.co"},{"name":"sslotsky","email":"saxosamo@gmail.com"},{"name":"terrysmith","email":"terry@designcollider.com"},{"name":"tim-speed","email":"iceczd@gmail.com"}],"_npmUser":{"name":"drewpowers","email":"drew@pow.rs"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-gen_1.1.0-alpha.4_1548804621408_0.8964922849342623"},"_hasShrinkwrap":false},"1.1.0":{"name":"@manifoldco/graphql-gen","version":"1.1.0","main":"dist/index.js","bin":{"graphql-gen":"./bin/cli.js"},"homepage":"https://github.com/manifoldco/graphql-gen#readme","repository":{"type":"git","url":"git+https://github.com/manifoldco/graphql-gen.git"},"keywords":["swagger","graphql","openapi","api","node"],"author":{"name":"dangodev"},"license":"ISC","bugs":{"url":"https://github.com/manifoldco/graphql-gen/issues"},"scripts":{"build":"node scripts/build","pregenerate":"npm run build","generate":"node scripts/generate","test":"jest"},"dependencies":{"chalk":"^2.4.2","fs-extra":"^7.0.1","js-yaml":"^3.12.1","meow":"^5.0.0","prettier":"^1.16.1"},"devDependencies":{"@types/fs-extra":"^5.0.4","@types/glob":"^7.1.1","@types/jest":"^23.3.13","@types/js-yaml":"^3.12.0","@types/prettier":"^1.15.2","glob":"^7.1.3","jest":"^23.6.0","rollup":"^1.1.2","rollup-plugin-terser":"^4.0.2","rollup-plugin-typescript":"^1.0.0","ts-jest":"^23.10.5","tslib":"^1.9.3","typescript":"^3.2.4"},"peerDependencies":{"prettier":"^1.0.0"},"gitHead":"9a54e6673b580a4f464d1aad3022b4130507b207","description":"Node client for generating crude GraphQL specs from Swagger OpenAPI.","_id":"@manifoldco/graphql-gen@1.1.0","_nodeVersion":"11.6.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-0UzauokuLTRS6RaVyyUFz5tKLPwjOoqfD0oo7GduHFXff2ZFcp9HIpdDpn8KMoP9Zij8S1MdWNxlm1VsLzQHvg==","shasum":"4885df6a07c05951dce51beb6b28b66d649cdeed","tarball":"https://registry.npmjs.org/@manifoldco/graphql-gen/-/graphql-gen-1.1.0.tgz","fileCount":5,"unpackedSize":15407,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUOV/CRA9TVsSAnZWagAAiXkP/RV+qL9wROpgBnGUvifc\nRmfm3gX/b4EtwAY2AclfrGjIbHTioDtO99S/Zl2H6qRGi+VSr3oozm21ZOwP\ncXF120VoL4DDQGZgxEEKybjDqK7YOHgx1qJUXT1F/Qn+pupKz94tAhbDduTo\nenI0hey+wEovbgSzhg/x0zJu+X91rJbjsXzpE8E7FUZz+qn4w5W3SAgvfOaw\nvB8h0y2JdysIWarQblu4jEkNbHPNM2SlPDD0X1i0B1+n1EiypIeMRcuuY8ff\nqQL8QYQKqkpX2pygyw7BQAcXnutfmgd9MMqTsmzvpsJ4SGQF7KJj+D86NhyJ\nOfJa8WIxTQroFThRbS0Yphb54b/UHyiHoIXVqVwaimZVwE6tB9aZ2CM2Ffdy\nrO2otaBGJhZfj86cU50JNYI1PvgziaxSMF8C09yIxjp7WABxLi+MNcn23M23\n1/lXpSfoySKMTYCB6JA7H014UKvpMRAMRuXCguBYRYzM6kogNNAOEr1oGf2a\ni1djbyzLKCZQd1lVJegy+zss22rPwRMVQkmBTyzMvvpA38ANHzFpZKTe/30L\nzTpL39C/BewrvWzAhvdHdIxiZME71ycxR/UbeWr6T3OzNe4jdV+u6wrSgZ17\nElTBZ+vwMpLCoSsrDcBAsS5ZXgCr4tSSaPClVDQNlNU/F8b5oZhtYkuau0Tt\nkqma\r\n=fDNz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCXzrVfvGcjuZLbMi95O8U0Badc5Y9SnD6i8AUnZWNGCQIgcJ22mT6j7Huaaf5o1YsjXl2zPy3g/DEvsv/cfstW7jU="}]},"maintainers":[{"name":"creager","email":"matthew.creager@gmail.com"},{"name":"davehyndman","email":"dave@manifold.co"},{"name":"davidleger95","email":"davidleger95@me.com"},{"name":"drewpowers","email":"drew@pow.rs"},{"name":"enmand","email":"enmand@gmail.com"},{"name":"garyposter","email":"gary@modernsongs.com"},{"name":"ianlivingstone","email":"ianrlivingstone@gmail.com"},{"name":"jbowes","email":"jbowes@repl.ca"},{"name":"jeffandersen","email":"jeffandersen@gmail.com"},{"name":"markjamieson","email":"markjamieson0@gmail.com"},{"name":"minivera","email":"gstpierre01@gmail.com"},{"name":"ntibaldi92","email":"nicole@manifold.co"},{"name":"sslotsky","email":"saxosamo@gmail.com"},{"name":"terrysmith","email":"terry@designcollider.com"},{"name":"tim-speed","email":"iceczd@gmail.com"}],"_npmUser":{"name":"drewpowers","email":"drew@pow.rs"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-gen_1.1.0_1548805502802_0.31192368814978577"},"_hasShrinkwrap":false},"1.1.1":{"name":"@manifoldco/graphql-gen","version":"1.1.1","description":"Generate GraphQL schemas from Swagger OpenAPI specs ","main":"dist/index.js","bin":{"graphql-gen":"./bin/cli.js"},"homepage":"https://github.com/manifoldco/graphql-gen#readme","repository":{"type":"git","url":"git+https://github.com/manifoldco/graphql-gen.git"},"keywords":["swagger","graphql","openapi","api","node"],"author":{"name":"dangodev"},"license":"ISC","bugs":{"url":"https://github.com/manifoldco/graphql-gen/issues"},"scripts":{"build":"node scripts/build","pregenerate":"npm run build","generate":"node scripts/generate","test":"jest"},"dependencies":{"chalk":"^2.4.2","fs-extra":"^7.0.1","js-yaml":"^3.12.1","meow":"^5.0.0","prettier":"^1.16.1"},"devDependencies":{"@types/fs-extra":"^5.0.4","@types/glob":"^7.1.1","@types/jest":"^23.3.13","@types/js-yaml":"^3.12.0","@types/prettier":"^1.15.2","glob":"^7.1.3","jest":"^23.6.0","rollup":"^1.1.2","rollup-plugin-terser":"^4.0.2","rollup-plugin-typescript":"^1.0.0","ts-jest":"^23.10.5","tslib":"^1.9.3","typescript":"^3.2.4"},"peerDependencies":{"prettier":"^1.0.0"},"gitHead":"be0d5df0f96a9fc54d742d8622642d8e2fc9942e","_id":"@manifoldco/graphql-gen@1.1.1","_nodeVersion":"11.6.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-bYMgUSoEr8T6UrD7zuI0OpFBD8uLhSWI2TWkmQUMFAclsvJJuqhb+HtwjzQKHQcnkIlIw0wBoLc5hskEHaZxHA==","shasum":"2f7725d22affc324a0fe12209d66c4229ee89650","tarball":"https://registry.npmjs.org/@manifoldco/graphql-gen/-/graphql-gen-1.1.1.tgz","fileCount":5,"unpackedSize":15656,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcURIECRA9TVsSAnZWagAAfeUQAIYToQ1YgV3Syq/LjxJn\njbf8liPzHg08zlxqjSjfdr/fKOHdgl4YrJ+SQZbwPiKTQBFDkNIMBV5+9SCe\nEirwA1FSrvawGbR7G1npVVynb52tndQdSQYY6x0Oq7P7CupUDspDwUqud1W0\nrBprrY6NG/ac6FZVMKDGZ+vchqbgWP9lVi3Xa+PX6bBIA2MTgMhFKZWmXlxn\nNqk52Df0vc6sTc4HRFLZJd7BYkr5s4ZO9Htg+DtBFR4iDAgohbhb/aCBKmkF\nGlqOzcGte/fhNDAeUkqGR+eatYnaP+1ipgskG41K6Kq2l7CqvdT0hD25CTvX\nJbg3h+dDVPXZV/8/zef1EaythEKdX9ht9qQUEDJKOTP1tbSoSQ1DS5W4cSXL\nBw6fCHj1IX9ZKGtzXWFEF8TTkQjcZKLNqAdWW8Uv2EWnvAeEJ4Ajtq9obalT\nCBYSIS3VuvvvztIrLj9jpdH/R5sWQKFoRuGWNKrfaGgWgKlCb3B+cpPSkTrF\npCLEkCNlOm7cZBTCCGgreMOd1Op1CpNpWQj+oC0WU5gn/3ZfO/eD5E8HcjAz\nbUrgW4kZymxA1n+NIc/RkWQUxuGHIdoMK+rgqe1CcylNMsEaNINBZUbpOGWq\nlueyg0ht5VhKgY/GqH2IJpDmfOUteXuBB0CWGoyUBuaFEgODIXHno7nWnYI8\n9I2o\r\n=+LdI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCIQ2xjimDqXvTLwO/OpaP7xFom1w3c/O9P0VllK1fuWgIhALdR8pJPaczAO/9y6U0vGCPgspaJBP10o7CJf6WEx7d6"}]},"maintainers":[{"name":"creager","email":"matthew.creager@gmail.com"},{"name":"davehyndman","email":"dave@manifold.co"},{"name":"davidleger95","email":"davidleger95@me.com"},{"name":"drewpowers","email":"drew@pow.rs"},{"name":"enmand","email":"enmand@gmail.com"},{"name":"garyposter","email":"gary@modernsongs.com"},{"name":"ianlivingstone","email":"ianrlivingstone@gmail.com"},{"name":"jbowes","email":"jbowes@repl.ca"},{"name":"jeffandersen","email":"jeffandersen@gmail.com"},{"name":"markjamieson","email":"markjamieson0@gmail.com"},{"name":"minivera","email":"gstpierre01@gmail.com"},{"name":"ntibaldi92","email":"nicole@manifold.co"},{"name":"sslotsky","email":"saxosamo@gmail.com"},{"name":"terrysmith","email":"terry@designcollider.com"},{"name":"tim-speed","email":"iceczd@gmail.com"}],"_npmUser":{"name":"drewpowers","email":"drew@pow.rs"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-gen_1.1.1_1548816900009_0.6547958433714449"},"_hasShrinkwrap":false},"1.1.2":{"name":"@manifoldco/graphql-gen","version":"1.1.2","description":"Generate GraphQL schemas from Swagger OpenAPI specs ","main":"dist/index.js","bin":{"graphql-gen":"./bin/cli.js"},"homepage":"https://github.com/manifoldco/graphql-gen#readme","repository":{"type":"git","url":"git+https://github.com/manifoldco/graphql-gen.git"},"keywords":["swagger","graphql","openapi","api","node"],"author":{"name":"dangodev"},"license":"ISC","bugs":{"url":"https://github.com/manifoldco/graphql-gen/issues"},"scripts":{"build":"node scripts/build","pregenerate":"npm run build","generate":"node scripts/generate","test":"jest","test:coverage":"jest --coverage"},"dependencies":{"chalk":"^2.4.2","fs-extra":"^7.0.1","js-yaml":"^3.12.1","meow":"^5.0.0","prettier":"^1.16.1"},"devDependencies":{"@types/fs-extra":"^5.0.4","@types/glob":"^7.1.1","@types/jest":"^23.3.13","@types/js-yaml":"^3.12.0","@types/prettier":"^1.15.2","jest":"^23.6.0","rollup":"^1.1.2","rollup-plugin-terser":"^4.0.2","rollup-plugin-typescript":"^1.0.0","ts-jest":"^23.10.5","tslib":"^1.9.3","tslint":"^5.12.1","tslint-config-prettier":"^1.17.0","tslint-plugin-prettier":"^2.0.1","typescript":"^3.2.4"},"peerDependencies":{"prettier":"^1.0.0"},"gitHead":"cc29f0aab8013f7438de071bced56cb6aca2f2ef","_id":"@manifoldco/graphql-gen@1.1.2","_nodeVersion":"11.6.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-wIlFi2/VXSwntZLNNjeaPUHKj5lGa9ZwTbGo2HkMRuGjz0VcZvSQhMwWoL+itdS2efrCQQc8MOssJjeKTkgb8A==","shasum":"294c6de27bb62323cebbd9498e53fa6589b52986","tarball":"https://registry.npmjs.org/@manifoldco/graphql-gen/-/graphql-gen-1.1.2.tgz","fileCount":5,"unpackedSize":16641,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUhrRCRA9TVsSAnZWagAAWA0QAJlgXsUFnTW/y6v6aBOj\ncSYWb0ElxyAk9zhziB5PqMZ3BgLDSC4Z80DfzomKj8/4qA4y7ianvGDktlzE\nFPicvyRtRSzdPnYa4WHNEQUsk1k/EkYB9AZIazKWJV+9OmWjoix6aNTYQmaw\nd9BkrVn13qb/nTjSTnAbnMvttXD8nEUjaldlE5FtVPBOehI+sRvgul+BqY2M\nOwb+jCF55cmTOMLLdFfuH5KIKyZC4SGfjY0oQonc47j+PQJUxRA8VTDXpYK+\n7VdPJNcwq7ZD9TIVNmhjmTscL06V1LfgKAnIwRs5QM2tH5Yvht10FvoMnGuJ\n7es7JfRBIC4iBlsdT+/XYJKfQZ20ObZ8+8FtkTtcrOMQawubPCAIMOUAs5hX\nZahihnYvUq9J+tKy0b8kgQ1lKDuC4dkJ4+DXr6I+wJbG1ym1Fsv3RRZ06lqH\nLWtYpJY+I+gVwbSUqpGHNIpziDOTbqF5trUKrxIWvsUpcTP7cAr/92OYBb7a\nv/vaVLzD634IEy1afs0/x88BOcvHfHhA5YXCQrpqU+TqAXhwbMLZXqYygstB\nJVs+oEWLgmNZE3hYIF2fJfnRgoGJZfMPi9FKqwjNV/kKlmXr/tPBTcAmopvi\nJ7adTkYvZ6NARuTtNKyJ76VEQ3JF1VMtmJUSxF1fCItZXoASoStgN+SSRDHU\nM1Jn\r\n=x/Gp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCpiAQ9sdaPnN2ynlT76qHm+qabewAQ8xggPW4UM1zPnQIgEhPhJCGze5PQZs2js8kgIkcf9mCndb6Fz6X4bSgYFDA="}]},"maintainers":[{"name":"creager","email":"matthew.creager@gmail.com"},{"name":"davehyndman","email":"dave@manifold.co"},{"name":"davidleger95","email":"davidleger95@me.com"},{"name":"drewpowers","email":"drew@pow.rs"},{"name":"enmand","email":"enmand@gmail.com"},{"name":"garyposter","email":"gary@modernsongs.com"},{"name":"ianlivingstone","email":"ianrlivingstone@gmail.com"},{"name":"jbowes","email":"jbowes@repl.ca"},{"name":"jeffandersen","email":"jeffandersen@gmail.com"},{"name":"markjamieson","email":"markjamieson0@gmail.com"},{"name":"minivera","email":"gstpierre01@gmail.com"},{"name":"ntibaldi92","email":"nicole@manifold.co"},{"name":"sslotsky","email":"saxosamo@gmail.com"},{"name":"terrysmith","email":"terry@designcollider.com"},{"name":"tim-speed","email":"iceczd@gmail.com"}],"_npmUser":{"name":"drewpowers","email":"drew@pow.rs"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-gen_1.1.2_1548884689008_0.4348482624073893"},"_hasShrinkwrap":false},"1.1.3":{"name":"@manifoldco/graphql-gen","version":"1.1.3","description":"Generate GraphQL schemas from Swagger OpenAPI specs ","main":"dist/index.js","bin":{"graphql-gen":"./bin/cli.js"},"homepage":"https://github.com/manifoldco/graphql-gen#readme","repository":{"type":"git","url":"git+https://github.com/manifoldco/graphql-gen.git"},"keywords":["swagger","graphql","openapi","api","node"],"author":{"name":"dangodev"},"license":"ISC","bugs":{"url":"https://github.com/manifoldco/graphql-gen/issues"},"scripts":{"build":"node scripts/build","prepublish":"npm run build","pregenerate":"npm run build","generate":"node scripts/generate","test":"jest","test:coverage":"jest --coverage"},"dependencies":{"chalk":"^2.4.2","fs-extra":"^7.0.1","js-yaml":"^3.12.1","meow":"^5.0.0","prettier":"^1.16.1"},"devDependencies":{"@types/fs-extra":"^5.0.4","@types/glob":"^7.1.1","@types/jest":"^23.3.13","@types/js-yaml":"^3.12.0","@types/prettier":"^1.15.2","jest":"^23.6.0","rollup":"^1.1.2","rollup-plugin-terser":"^4.0.2","rollup-plugin-typescript":"^1.0.0","ts-jest":"^23.10.5","tslib":"^1.9.3","tslint":"^5.12.1","tslint-config-prettier":"^1.17.0","tslint-plugin-prettier":"^2.0.1","typescript":"^3.2.4"},"peerDependencies":{"prettier":"^1.0.0"},"gitHead":"a587fa23495b97d6d4e4ca0cec03f9e319d61aac","_id":"@manifoldco/graphql-gen@1.1.3","_nodeVersion":"11.6.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-2Ppq9qbxX8ioHYUFKRrf8FkW/wjOp85WV3Suzer2WhYmajdXq9/YGJpT1xGXR5WsWybEt3o/K3WvrkQnHSRBUA==","shasum":"6f0344e352ae83dc49c93ce746dff1a4e6c54e9f","tarball":"https://registry.npmjs.org/@manifoldco/graphql-gen/-/graphql-gen-1.1.3.tgz","fileCount":5,"unpackedSize":16813,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUjbtCRA9TVsSAnZWagAAOysQAKPlSQFauAkNpkurrHDZ\nd14ziwd50DmeIY2LkSpdwvnUE4GIzfLcC3SEhVn047laqr+dfZWD1EldTfwW\nkrSAk7TiZDd+FMDpoWFI/BUohJT/mxY0I8InaIAKiYQV+6ThBSH/0ttxlJ7p\nV8wy+QCePXRxbuxi+lhP02QokwduRoslaZUygMgSIYzula/zs2ZBb+4R7a2B\nErRVCDwHrtB5jBJRweUvyoyPo1SHrQng1ThOsbXVcv1znE+Rm9m4HcwmNiEO\na6YONdjNuD/1bL6MnJzIASmb7GVgZePwUWSroN1sxSm7MvZXupuhF9VmK8BZ\njXFF4pCTnOzFMB4sOjhqaKw7Tw/v+xUmjXZC6G5rRbKvDGhPfFQxlg3Ex5lq\nHMChDZZP0gT2753VFP5//dg6/AlIYY7K6pcEbsmAlcD2kOwdGWKwNIfzf0aE\nUGbKVO9qnoMQ64nGNBhfKSC2MhIalNOjNfIObzwCW7MRDHBq5yjnyRjvmGwC\nTugRy8QYbwfnABXPBl5QoMp5tldaEK8OD7fw6iSadYTGi0JWuLEr70ZJJZoY\nfMS9nto3zEFE8hcE5TEMYzUgDm0Bp5z8F89Aa0iX5AxEdrSA0RlIldCPxNNR\nIgw3cCdb05JZOmc1TTawwweJt52bqUjwD7FaWQhBeRdwozSjhmbrVXwgeGW8\nvrco\r\n=ug6V\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE/GqE3gI0E+HbOE3JmulP14uQowyPYYPD8Dp5GYKQiPAiEAptGKRJUF5ekUBGuOFYB+IPS7vUEjU8yD5TinhQpn9HU="}]},"maintainers":[{"name":"creager","email":"matthew.creager@gmail.com"},{"name":"davehyndman","email":"dave@manifold.co"},{"name":"davidleger95","email":"davidleger95@me.com"},{"name":"drewpowers","email":"drew@pow.rs"},{"name":"enmand","email":"enmand@gmail.com"},{"name":"garyposter","email":"gary@modernsongs.com"},{"name":"ianlivingstone","email":"ianrlivingstone@gmail.com"},{"name":"jbowes","email":"jbowes@repl.ca"},{"name":"jeffandersen","email":"jeffandersen@gmail.com"},{"name":"markjamieson","email":"markjamieson0@gmail.com"},{"name":"minivera","email":"gstpierre01@gmail.com"},{"name":"ntibaldi92","email":"nicole@manifold.co"},{"name":"sslotsky","email":"saxosamo@gmail.com"},{"name":"terrysmith","email":"terry@designcollider.com"},{"name":"tim-speed","email":"iceczd@gmail.com"}],"_npmUser":{"name":"drewpowers","email":"drew@pow.rs"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-gen_1.1.3_1548891882328_0.7937925847709655"},"_hasShrinkwrap":false},"1.1.4":{"name":"@manifoldco/graphql-gen","version":"1.1.4","description":"Generate GraphQL schemas from Swagger OpenAPI specs ","main":"dist/index.js","bin":{"graphql-gen":"./bin/cli.js"},"homepage":"https://github.com/manifoldco/graphql-gen#readme","repository":{"type":"git","url":"git+https://github.com/manifoldco/graphql-gen.git"},"keywords":["swagger","graphql","openapi","api","node"],"author":{"name":"dangodev"},"license":"ISC","bugs":{"url":"https://github.com/manifoldco/graphql-gen/issues"},"scripts":{"build":"node scripts/build","prepublish":"npm run build","pregenerate":"npm run build","generate":"node scripts/generate","test":"jest","test:coverage":"jest --coverage"},"dependencies":{"chalk":"^2.4.2","fs-extra":"^7.0.1","js-yaml":"^3.12.1","meow":"^5.0.0","prettier":"^1.16.1"},"devDependencies":{"@types/fs-extra":"^5.0.4","@types/glob":"^7.1.1","@types/jest":"^23.3.13","@types/js-yaml":"^3.12.0","@types/prettier":"^1.15.2","jest":"^23.6.0","rollup":"^1.1.2","rollup-plugin-terser":"^4.0.2","rollup-plugin-typescript":"^1.0.0","ts-jest":"^23.10.5","tslib":"^1.9.3","tslint":"^5.12.1","tslint-config-prettier":"^1.17.0","tslint-plugin-prettier":"^2.0.1","typescript":"^3.2.4"},"peerDependencies":{"prettier":"^1.0.0"},"gitHead":"ab5345ab1ad2e0bfd8a5fedf880c422aef913793","_id":"@manifoldco/graphql-gen@1.1.4","_nodeVersion":"11.6.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-OU+jI1XWwsyUWjTVispYNDSHiU8YhieSYCqdnYXUZ+a5mjGvMGUYf0OfgtSk+kCixxlnPnU4Yidrth+186L/ZA==","shasum":"bdad4b3f7ed82791d2f355873de466a28b0e3ded","tarball":"https://registry.npmjs.org/@manifoldco/graphql-gen/-/graphql-gen-1.1.4.tgz","fileCount":5,"unpackedSize":17037,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUxqWCRA9TVsSAnZWagAAMTQP/2hwm3xvZZ7d0oTLHfTO\nboax4CIX5jPPuz8EWEVV6rk4ionnLpBx7QdRAn5ROcYskPQMKCligLQazoru\n87nirmv1D3wcoHiMX+Zi50z8t4fFiuIYpd/W1kh6RsxJNwCK1LECMtkXvj2L\nwqf30I0UBqxUMYp27SO84F8iknXJYHGtyYYH4Wws25qIM1EDdFgkkteYDwA5\nzZxuBKSuH1zbDtp3opWZLAoPBH42Z4uc1az0brWp/NAEtGwbwWL0vtRrkiR3\nKwWolfKQ4k5cfLimQQGrnlVuKjnBYqH6TGtIRLzCjMq9rSiq44mdeBhYqmEo\n1ieRoOwu1kxkF0QBXWfX93lw2wRJvmPG8KzejpUCv5ectzfFFnnPVcupoj5j\nUJpo2GVK7lclrg06b4Jw7jD0GipCrr6ka6atkXL8dCiOLeWEi8LqnL3gTCZL\nTMuQlvuNW9+UGEePYNYv5ZnLbQ4A+dA4Au23VOBXGLD1xNh3VdMrlciFBqtS\nply0jTSsbJPm7kQjddaztGpbsoj54kyEVh+6IQMjtcGJ2w7JMm9krNJFBxdq\nqMCcTETqUEpVUGGjvXj7JaBAFYo9EC3stdsMVbvUa4uu41EFT6v99HiTGjN7\nzNNpnk4jMJrAAx0wxuoRqNe99R+T7BUhqw9oPHFBbaNzp5RywgSy7kz1Wvit\nnX7D\r\n=gpn6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDaRCe6S/JAY3lnroNBuMtURTNKN6G+tgimgDgNvl1ZzAiEAqaHBSLzUShmu3BpJTnaN6tEl1ghEzLB/NPJdSpwW7cs="}]},"maintainers":[{"name":"creager","email":"matthew.creager@gmail.com"},{"name":"davehyndman","email":"dave@manifold.co"},{"name":"davidleger95","email":"davidleger95@me.com"},{"name":"drewpowers","email":"drew@pow.rs"},{"name":"enmand","email":"enmand@gmail.com"},{"name":"garyposter","email":"gary@modernsongs.com"},{"name":"ianlivingstone","email":"ianrlivingstone@gmail.com"},{"name":"jbowes","email":"jbowes@repl.ca"},{"name":"jeffandersen","email":"jeffandersen@gmail.com"},{"name":"markjamieson","email":"markjamieson0@gmail.com"},{"name":"minivera","email":"gstpierre01@gmail.com"},{"name":"ntibaldi92","email":"nicole@manifold.co"},{"name":"sslotsky","email":"saxosamo@gmail.com"},{"name":"terrysmith","email":"terry@designcollider.com"},{"name":"tim-speed","email":"iceczd@gmail.com"}],"_npmUser":{"name":"drewpowers","email":"drew@pow.rs"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-gen_1.1.4_1548950165974_0.28934633578211444"},"_hasShrinkwrap":false},"1.1.5":{"name":"@manifoldco/graphql-gen","version":"1.1.5","description":"Generate GraphQL schemas from Swagger OpenAPI specs ","main":"dist/index.js","bin":{"graphql-gen":"./bin/cli.js"},"homepage":"https://github.com/manifoldco/graphql-gen#readme","repository":{"type":"git","url":"git+https://github.com/manifoldco/graphql-gen.git"},"keywords":["swagger","graphql","openapi","api","node"],"author":{"name":"dangodev"},"license":"ISC","bugs":{"url":"https://github.com/manifoldco/graphql-gen/issues"},"scripts":{"build":"node scripts/build","prepublish":"npm run build","pregenerate":"npm run build","generate":"node scripts/generate","test":"jest","test:coverage":"jest --coverage"},"dependencies":{"chalk":"^2.4.2","fs-extra":"^7.0.1","js-yaml":"^3.12.1","meow":"^5.0.0","prettier":"^1.16.1"},"devDependencies":{"@types/fs-extra":"^5.0.4","@types/glob":"^7.1.1","@types/jest":"^23.3.13","@types/js-yaml":"^3.12.0","@types/prettier":"^1.15.2","jest":"^23.6.0","rollup":"^1.1.2","rollup-plugin-terser":"^4.0.2","rollup-plugin-typescript":"^1.0.0","ts-jest":"^23.10.5","tslib":"^1.9.3","tslint":"^5.12.1","tslint-config-prettier":"^1.17.0","tslint-plugin-prettier":"^2.0.1","typescript":"^3.2.4"},"peerDependencies":{"prettier":"^1.0.0"},"gitHead":"7676d3461914433fd7bc8d0999c7c2521c89d944","_id":"@manifoldco/graphql-gen@1.1.5","_npmVersion":"6.5.0","_nodeVersion":"11.9.0","_npmUser":{"name":"drewpowers","email":"drew@pow.rs"},"dist":{"integrity":"sha512-brk6hfpK63RkOLlFaRITTNy1xcPqbBjMdUKYhlpWqrr4vHxUX8DrmZwgPYbJvKq3g2tVUG9guHigOfBqBoY8rw==","shasum":"670709830e332334c8c0c81808435af703e3614e","tarball":"https://registry.npmjs.org/@manifoldco/graphql-gen/-/graphql-gen-1.1.5.tgz","fileCount":5,"unpackedSize":17242,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcVHoTCRA9TVsSAnZWagAA8/wP/1SK5lTc9af3Elrr/esK\nGBtztFo9gdzR1sXPoYk+Pw3BEC3YqtTlkH137yq5MrmiUnkFZqwk4xhhTJQD\n4Awwa7F9Mzd5QpkIsPFI6DJeUdJC1BVqPpcPqza7R619WbfgT3zxp1GCZGIH\nWTj5WggFJMbGFO/kc2+5/8JypbhMNhLg72radYlge09nUGVTUjLGq7hJfdIh\nNhuxvrpc3H/2IeXO5ny+/YRIgfM3qxgsH8bIAKd5BvfSUjGOZCgbIxXyS21D\nSjVgrb8Sn/JdH+FP8WlLzgRivgnbX+z9M0/V9MQiB5ZHUjsC8e4a2ge1PZaR\nGroR+ZXlPJnxqptWJOaxKsFJGvuY34iSL+maGdbMoVLtq32L8BZOM49ucyxJ\nuhks1zv/sJatxwtb9QJKPyOwk7ks2+rpecGbdzdLmb1Ta5dUx6x3g1hgHooc\naK9VxNAYm7hncxrMeEZN/EDFW+6s5FNBar2H5Q2WY7P26GJYq3qX3YRxVqXS\nz2owy6r8bcvKMIZCz1B68TjtKyMXMSfhNUxoJ2iUC4obcAXDoWPCHKTO5ErI\nw2Po3c3vDApUuPQRNd8kUj0L4ns7cpM2HHWpXUpsV/V5gNU8M59TE6MtrPxo\npz3i6qE0s8y2w57NPAx5+b5bMz/u2jnukhR26Ok0doe9ZGv29S5WHpE99jDC\nzQbF\r\n=mrs2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFWcx2PXzwBmAOwI72sCWhDCNW+hjtktFFUyPF02ZB9PAiEAv+K/hOtO6Lm87dySf0RZNOMWgHC9+E+rWbLuJdj02dw="}]},"maintainers":[{"name":"creager","email":"matthew.creager@gmail.com"},{"name":"davehyndman","email":"dave@manifold.co"},{"name":"davidleger95","email":"davidleger95@me.com"},{"name":"drewpowers","email":"drew@pow.rs"},{"name":"enmand","email":"enmand@gmail.com"},{"name":"garyposter","email":"gary@modernsongs.com"},{"name":"ianlivingstone","email":"ianrlivingstone@gmail.com"},{"name":"jbowes","email":"jbowes@repl.ca"},{"name":"jeffandersen","email":"jeffandersen@gmail.com"},{"name":"markjamieson","email":"markjamieson0@gmail.com"},{"name":"minivera","email":"gstpierre01@gmail.com"},{"name":"ntibaldi92","email":"nicole@manifold.co"},{"name":"sslotsky","email":"saxosamo@gmail.com"},{"name":"terrysmith","email":"terry@designcollider.com"},{"name":"tim-speed","email":"iceczd@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-gen_1.1.5_1549040146892_0.09849706621477905"},"_hasShrinkwrap":false},"1.1.6-0":{"name":"@manifoldco/graphql-gen","description":"Generate GraphQL schemas from Swagger OpenAPI specs ","version":"1.1.6-0","license":"ISC","bin":{"graphql-gen":"./bin/cli.js"},"source":"dist-src/index.js","types":"dist-types/index.d.ts","main":"dist-node/index.js","pika":true,"sideEffects":false,"keywords":["swagger","graphql","openapi","api","node"],"homepage":"https://github.com/manifoldco/graphql-gen#readme","bugs":{"url":"https://github.com/manifoldco/graphql-gen/issues"},"repository":{"type":"git","url":"git+https://github.com/manifoldco/graphql-gen.git"},"dependencies":{"chalk":"^2.4.2","fs-extra":"^7.0.1","js-yaml":"^3.13.0","meow":"^5.0.0","prettier":"^1.16.4"},"peerDependencies":{"prettier":"^1.0.0"},"devDependencies":{"@pika/pack":"^0.3.5","@pika/plugin-build-node":"^0.3.14","@pika/plugin-copy-assets":"^0.3.14","@pika/plugin-ts-standard-pkg":"^0.3.14","@types/fs-extra":"^5.0.4","@types/glob":"^7.1.1","@types/jest":"^24.0.11","@types/js-yaml":"^3.12.0","@types/prettier":"^1.15.2","@typescript-eslint/eslint-plugin":"^1.5.0","@typescript-eslint/parser":"^1.5.0","eslint":"^5.15.3","eslint-config-prettier":"^4.1.0","eslint-plugin-prettier":"^3.0.1","jest":"^24.5.0","ts-jest":"^24.0.0","tslib":"^1.9.3","typescript":"^3.3.4000"},"readme":"[![version\n(scoped)](https://img.shields.io/npm/v/@manifoldco/graphql-gen.svg)](https://www.npmjs.com/package/@manifoldco/graphql-gen)\n[![codecov](https://codecov.io/gh/manifoldco/graphql-gen/branch/master/graph/badge.svg)](https://codecov.io/gh/manifoldco/graphql-gen)\n\n# ⚛️ graphql-gen\n\nNode client for generating crude GraphQL specs from Swagger OpenAPI.\n\n💅 Prettifies output via [Prettier][prettier].\n\n#### Support\n\n| GraphQL Features                     |     |\n| :----------------------------------- | :-: |\n| Enum                                 | ✅  |\n| ID                                   | ✅  |\n| Union (`oneOf`)                      | ✅  |\n| Non-nullable                         | ✅  |\n| Primitives (string, boolean, number) | ✅  |\n| Query                                | 🚫  |\n| Mutation                             | 🚫  |\n\nTo compare actual generated output, see the [example](./example) folder.\n\n## Usage\n\n### CLI\n\n```bash\nnpx @manifoldco/graphql-gen schema.yaml --output schema.graphql\n\n# 🚀 schema.yaml -> schema.graphql [2ms]\n```\n\nThis will save a `schema.graphql` file in the current folder. The CLI can\naccept YAML or JSON for the input file.\n\n### Node\n\n```bash\nnpm i --save-dev @manifoldco/graphql-gen\n```\n\n```js\nconst graphqlGen = require('@manifoldco/graphql-gen');\n\ngraphqlGen(spec, [options]);\n```\n\n`spec` must be in JSON format. For an example of converting YAML to JSON, see\nthe [generate.js](./scripts/generate.js) script.\n\n### Options\n\n| Name      | Default  | Description                                                |\n| :-------- | :------- | :--------------------------------------------------------- |\n| `output`  | (stdout) | Where should the output file be saved?                     |\n| `swagger` | `2`      | Which Swagger version to use. Currently only supports `2`. |\n\n## FAQ\n\n#### Why does this exist apart from [yarax/swagger-to-graphql](https://github.com/yarax/swagger-to-graphql) ?\n\nThat didn’t work for our Swagger 2.0 specs 🤷. While normally a PR is the best\ncourse of action, this repo exists because it was less effort to build something\nthat works for us than rewrite a popular library (it wasn’t a quick fix).\n\n#### Why aren’t Queries and Mutations generated from the OpenAPI spec?\n\nWhile it’s possible to generate _something_ from OpenAPI, it’s intentionally\nomitted from autogeneration here. Queries and Mutations are best left up to\nhumans, so you can determine what developers should access, and how.\nUltimately generating these will always fall short of how real humans\ncould—and should—use your GraphQL endpoint.\n\n## Notes\n\nGraphQL is a spec, just like OpenAPI. For this reason, automatic generation\nisn’t ideal long-term. This library should probably be used as a\n**first-pass** to migrate an OpenAPI endpoint to GraphQL. This can generate\ntypes, but can’t intelligently generate the best queries and mutations for\nyour specific endpoint.\n\nA common example of this: Swagger has a concept of `format: datetime`.\nGraphQL cares about this, but doesn’t assume the formatting. Is this UNIX\ntime? ISO? Are there timezones? Types can be so much more descriptive than\nmere `string` or `int`, and GraphQL gives you the tools to declare this\nyourself.\n\n[prettier]: https://github.com/prettier/prettier\n","readmeFilename":"README.md","_id":"@manifoldco/graphql-gen@1.1.6-0","_nodeVersion":"11.12.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-G3p5S12Vu67l0uxioXKbo9lroOrw06ww1rW/hFr5kpSfnl5QaJoVZlHwtvPkVIjZGVAM0c5TQ7kCm6IeVwnJ7A==","shasum":"415ef054b8a4fd197d38504a4dea674a1f323429","tarball":"https://registry.npmjs.org/@manifoldco/graphql-gen/-/graphql-gen-1.1.6-0.tgz","fileCount":10,"unpackedSize":26822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJclGv9CRA9TVsSAnZWagAA+iUQAJf6TjxM+YZzZcm18VwM\nt7jLx7UfbPF6HvB/i6e8JG8mMjO67hz757BT3OoWATk0TehH1ucp7NHKkIa/\nkTz8xs2Y9+cOFF/2vZAzKcd/a4WtZ7FnlhdC1kOvR/TLLVw1QHjTUfBHphDK\ngOYUevABCOXpCR2GQL+XaYJhinlaX7dM97GpdZzeEPPv/fMaIRsOk54190XD\nBy87yFoFQdJxxp2oQ9K9OR3EQUg0cWESr/dTZT677gzhm0UXmGfOVKSJrwoJ\ndBYkkEYz4jncX6AFCKmnS0eq/2xLUhY8I8cCGwzePQFsMUQ2eQrbC/3vYH8l\nfzcbj8Jwr9YTS35pMuMHP3HoFXoa/fvi/JwP2tE1t7ZDTzSnROh9eRP9SFoK\nsFPvYmqmP+odZlHIq/yiVZLlzeIX4ns26oKk+wZZ3OCV88r0afDjXm+U55BJ\ndvGiCYAmCH/XYA7b1e1Juw4C954+BrZRHIHzvFHggxAUINJnXxlEceRY2pM7\ncB7QmCqSkbmuMtCkdYdzd2TvFi+YEkVFfPs2hECsp9XBEJhlPhkRjWafyOXe\nZXLA5UN1JzIcJdhManodF3uZrx6ZDu0NN/kpWyera0T90Js1ukmplphZcy9z\nc0vb28THqCk1eSlzFMgUv75Y/erH4YMJxpaXI7rUh76JEb2EyPKyHAhJ8MXl\n4ivo\r\n=/hQu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHcgTNazV69tJKb5gy4EwnvOu/ioaxd0hE5bYQbL9SEBAiEA8VRtcqvLje17QseFWkEQSB2j6PumOBvYLtEprBZWD+E="}]},"maintainers":[{"email":"caedeal@gmail.com","name":"caedeal"},{"email":"matthew.creager@gmail.com","name":"creager"},{"email":"dave@manifold.co","name":"davehyndman"},{"email":"dleger@manifold.co","name":"davidleger95"},{"email":"drew@pow.rs","name":"drewpowers"},{"email":"enmand@gmail.com","name":"enmand"},{"email":"gary@modernsongs.com","name":"garyposter"},{"email":"ianrlivingstone@gmail.com","name":"ianlivingstone"},{"email":"jbowes@repl.ca","name":"jbowes"},{"email":"jeffandersen@gmail.com","name":"jeffandersen"},{"email":"jessykarenman@gmail.com","name":"jessifoo"},{"email":"markjamieson0@gmail.com","name":"markjamieson"},{"email":"gstpierre01@gmail.com","name":"minivera"},{"email":"nicole@manifold.co","name":"ntibaldi92"},{"email":"boudreau.benjamin@gmail.com","name":"seriousben"},{"email":"saxosamo@gmail.com","name":"sslotsky"},{"email":"terry@designcollider.com","name":"terrysmith"},{"email":"iceczd@gmail.com","name":"tim-speed"}],"_npmUser":{"name":"drewpowers","email":"drew@pow.rs"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-gen_1.1.6-0_1553230845193_0.8197977172808293"},"_hasShrinkwrap":false},"1.1.6":{"name":"@manifoldco/graphql-gen","description":"Generate GraphQL schemas from Swagger OpenAPI specs ","version":"1.1.6","license":"ISC","bin":{"graphql-gen":"./bin/cli.js"},"source":"dist-src/index.js","types":"dist-types/index.d.ts","main":"dist-node/index.js","pika":true,"sideEffects":false,"keywords":["swagger","graphql","openapi","api","node"],"homepage":"https://github.com/manifoldco/graphql-gen#readme","bugs":{"url":"https://github.com/manifoldco/graphql-gen/issues"},"repository":{"type":"git","url":"git+https://github.com/manifoldco/graphql-gen.git"},"dependencies":{"chalk":"^2.4.2","fs-extra":"^7.0.1","js-yaml":"^3.13.0","meow":"^5.0.0","prettier":"^1.16.4"},"peerDependencies":{"prettier":"^1.0.0"},"devDependencies":{"@pika/pack":"^0.3.5","@pika/plugin-build-node":"^0.3.14","@pika/plugin-copy-assets":"^0.3.14","@pika/plugin-ts-standard-pkg":"^0.3.14","@types/fs-extra":"^5.0.4","@types/glob":"^7.1.1","@types/jest":"^24.0.11","@types/js-yaml":"^3.12.0","@types/prettier":"^1.15.2","@typescript-eslint/eslint-plugin":"^1.5.0","@typescript-eslint/parser":"^1.5.0","eslint":"^5.15.3","eslint-config-prettier":"^4.1.0","eslint-plugin-prettier":"^3.0.1","jest":"^24.5.0","ts-jest":"^24.0.0","tslib":"^1.9.3","typescript":"^3.3.4000"},"_id":"@manifoldco/graphql-gen@1.1.6","_nodeVersion":"11.12.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-ZEFlfbN5vEIaNJ6ONG/h85xxhcY3Z+pwZAhAnGcA/3X4S4DOg3YxKONlq4GZn2pSU5NUuHtRzUnsIDPUSW7F4A==","shasum":"da235e74af2a97ea70390fcfd6b9edf1e7dfe58e","tarball":"https://registry.npmjs.org/@manifoldco/graphql-gen/-/graphql-gen-1.1.6.tgz","fileCount":10,"unpackedSize":28856,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJclG+8CRA9TVsSAnZWagAAHfsP/3pvtyu69ZeLXyRZJhk5\naSJe6D/JhKe8VeAQg8tWPkoV5yJR31DQuaE8jHJuH6n1dnLd02AfH90lmRfO\nzSSAKT7G3TNDkvclue6oLOebNPdUWNqX0wxrmk8CLz8umlWkCS4AVUrWQ92X\nkFkTla/qkSjy1wLxb1HhjSX/AMZ/PKB1LoutkKQSBRVRH41aKzzLyi9zrNh/\nrWmrA0JKIvOWTuU3FXVNTrXKngXy3iZv8QKVDzDtN5gMrsPHS2bSdK9IIY/e\nF9kGEzVUES/Bis9hkLQlpe4jTBZImVPb65oHGbkEyG/czbKcXoBHxJ+ZD4Bv\nUm33CIs/FjrvFP6XB+ZQvtq2yyVShZo/wjr6SXm3Y9Ev6AolKu8YPtWVo7zr\nZK4Rww38EorqsR5xMHHjX4WB9kYSiLn2nFjuA1X4M8BhIFZKMJ2IPRyrgdVX\nAXTKFaMtPJRvZhzqlNKg5At1jP5JlS606xawPNbS6RmCQw0sHnDcEbpNEC1U\ns16JhcykrkKn7dROlofU0gHdCGf9/a0gNU+LsL7SXyZwzYzHlZDRt0TaM75z\nZjOuvmbUGHSUCYWcduHsK1z/TfeYD4S9i3EvtgLb9YFhZpMmdC8oRbZYgFQ1\nltsAkOl3Etx5G5hyLtmS+uj2p8WoHph4WxvVJztQ9QMl0boTgR7ccPOHf0Ir\nkINM\r\n=K35h\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDg8pukJlMLX08Kyql3d0k7w1XetolSpIeSiE15RAQzEwIhANi8GKC+pw4tEmuWqsn9CzNbrvuisXp1//A6D2DjuubV"}]},"maintainers":[{"email":"caedeal@gmail.com","name":"caedeal"},{"email":"matthew.creager@gmail.com","name":"creager"},{"email":"dave@manifold.co","name":"davehyndman"},{"email":"dleger@manifold.co","name":"davidleger95"},{"email":"drew@pow.rs","name":"drewpowers"},{"email":"enmand@gmail.com","name":"enmand"},{"email":"gary@modernsongs.com","name":"garyposter"},{"email":"ianrlivingstone@gmail.com","name":"ianlivingstone"},{"email":"jbowes@repl.ca","name":"jbowes"},{"email":"jeffandersen@gmail.com","name":"jeffandersen"},{"email":"jessykarenman@gmail.com","name":"jessifoo"},{"email":"markjamieson0@gmail.com","name":"markjamieson"},{"email":"gstpierre01@gmail.com","name":"minivera"},{"email":"nicole@manifold.co","name":"ntibaldi92"},{"email":"boudreau.benjamin@gmail.com","name":"seriousben"},{"email":"saxosamo@gmail.com","name":"sslotsky"},{"email":"terry@designcollider.com","name":"terrysmith"},{"email":"iceczd@gmail.com","name":"tim-speed"}],"_npmUser":{"name":"drewpowers","email":"drew@pow.rs"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-gen_1.1.6_1553231803674_0.10200131149037106"},"_hasShrinkwrap":false}},"time":{"created":"2019-01-29T22:28:25.272Z","1.1.0-alpha.0":"2019-01-29T22:28:25.542Z","modified":"2022-04-06T03:26:18.220Z","1.1.0-alpha.2":"2019-01-29T23:26:43.808Z","1.1.0-alpha.3":"2019-01-29T23:28:38.300Z","1.1.0-alpha.4":"2019-01-29T23:30:21.513Z","1.1.0":"2019-01-29T23:45:02.954Z","1.1.1":"2019-01-30T02:55:00.163Z","1.1.2":"2019-01-30T21:44:49.146Z","1.1.3":"2019-01-30T23:44:42.477Z","1.1.4":"2019-01-31T15:56:06.072Z","1.1.5":"2019-02-01T16:55:46.993Z","1.1.6-0":"2019-03-22T05:00:45.316Z","1.1.6":"2019-03-22T05:16:43.802Z"},"maintainers":[{"email":"jbowes@repl.ca","name":"jbowes"},{"email":"dave@manifold.co","name":"davehyndman"},{"email":"markjamieson0@gmail.com","name":"markjamieson"},{"email":"ntassone@gmail.com","name":"ntassone"}],"description":"Generate GraphQL schemas from Swagger OpenAPI specs ","homepage":"https://github.com/manifoldco/graphql-gen#readme","repository":{"type":"git","url":"git+https://github.com/manifoldco/graphql-gen.git"},"bugs":{"url":"https://github.com/manifoldco/graphql-gen/issues"},"license":"ISC","readme":"[![version\n(scoped)](https://img.shields.io/npm/v/@manifoldco/graphql-gen.svg)](https://www.npmjs.com/package/@manifoldco/graphql-gen)\n[![codecov](https://codecov.io/gh/manifoldco/graphql-gen/branch/master/graph/badge.svg)](https://codecov.io/gh/manifoldco/graphql-gen)\n\n# ⚛️ graphql-gen\n\nNode client for generating crude GraphQL specs from Swagger OpenAPI.\n\n💅 Prettifies output via [Prettier][prettier].\n\n#### Support\n\n| GraphQL Features                     |     |\n| :----------------------------------- | :-: |\n| Enum                                 | ✅  |\n| ID                                   | ✅  |\n| Union (`oneOf`)                      | ✅  |\n| Non-nullable                         | ✅  |\n| Primitives (string, boolean, number) | ✅  |\n| Query                                | 🚫  |\n| Mutation                             | 🚫  |\n\nTo compare actual generated output, see the [example](./example) folder.\n\n## Usage\n\n### CLI\n\n```bash\nnpx @manifoldco/graphql-gen schema.yaml --output schema.graphql\n\n# 🚀 schema.yaml -> schema.graphql [2ms]\n```\n\nThis will save a `schema.graphql` file in the current folder. The CLI can\naccept YAML or JSON for the input file.\n\n#### Generating multiple schemas\n\nSay you have multiple schemas you need to parse. I’ve found the simplest way\nto do that is to use npm scripts. In your `package.json`, you can do\nsomething like the following:\n\n```json\n\"scripts\": {\n  \"generate:specs\": \"npm run generate:specs:one && npm run generate:specs:two\",\n  \"generate:specs:one\": \"npx @manifoldco/graphql-gen one.yaml -o one.graphql\",\n  \"generate:specs:two\": \"npx @manifoldco/graphql-gen two.yaml -o two.graphql\"\n}\n```\n\nRinse and repeat for more specs.\n\nFor anything more complicated, or for generating specs dynamically, you can\nalso use the Node API (below).\n\n#### CLI Options\n\n| Option                | Alias | Default  | Description                                                |\n| :-------------------- | :---- | :------: | :--------------------------------------------------------- |\n| `--output [location]` | `-o`  | (stdout) | Where should the output file be saved?                     |\n| `--swagger [version]` | `-s`  |   `2`    | Which Swagger version to use. Currently only supports `2`. |\n\n### Node\n\n```bash\nnpm i --save-dev @manifoldco/graphql-gen\n```\n\n```js\nconst { readFileSync } = require('fs');\nconst graphqlGen = require('@manifoldco/graphql-gen');\n\nconst input = JSON.parse(readFileSync('spec.json', 'utf8')); // Input be any JS object (OpenAPI format)\nconst output = graphqlGen(input); // Outputs GraphQL schema as a string (to be parsed, or written to a file)\n```\n\n(OpenAPI format), and return a GraphQL schema in string format. This lets you pull\nfrom any source (a Swagger server, local files, etc.), and similarly lets put\nThe Node API is a bit more flexible: it will only take a JS object as input\nthe output anywhere. It even allows for some post-processing in-between if\ndesired.\n\nIf you are working with local files, you’ll have to read/write files\nyourself. Also, if your specs are in YAML, you’ll have to convert them to JS\nobjects. A library such as [js-yaml][js-yaml] does make this trivial, though!\nLastly, if you’re batching large folders of specs, [glob][glob] may also come\nin handy.\n\n#### Node Options\n\n| Name        |   Type   |  Default   | Description                                                                                          |\n| :---------- | :------: | :--------: | :--------------------------------------------------------------------------------------------------- |\n| `namespace` | `string` | `OpenAPI2` | How should the output be namespaced? (namespacing is enforced as there’s a high chance of collision) |\n| `swagger`   | `number` |    `2`     | Which Swagger version to use. Currently only supports `2`.                                           |\n\n## FAQ\n\n#### Why does this exist apart from [yarax/swagger-to-graphql](https://github.com/yarax/swagger-to-graphql) ?\n\nThat didn’t work for our Swagger 2.0 specs 🤷. While normally a PR is the best\ncourse of action, this repo exists because it was less effort to build something\nthat works for us than rewrite a popular library (it wasn’t a quick fix).\n\n#### Why aren’t Queries and Mutations generated from the OpenAPI spec?\n\nWhile it’s possible to generate _something_ from OpenAPI, it’s intentionally\nomitted from autogeneration here. Queries and Mutations are best left up to\nhumans, so you can determine what developers should access, and how.\nUltimately generating these will always fall short of how real humans\ncould—and should—use your GraphQL endpoint.\n\n## Notes\n\nGraphQL is a spec, just like OpenAPI. For this reason, automatic generation\nisn’t ideal long-term. This library should probably be used as a\n**first-pass** to migrate an OpenAPI endpoint to GraphQL. This can generate\ntypes, but can’t intelligently generate the best queries and mutations for\nyour specific endpoint.\n\nA common example of this: Swagger has a concept of `format: datetime`.\nGraphQL cares about this, but doesn’t assume the formatting. Is this UNIX\ntime? ISO? Are there timezones? Types can be so much more descriptive than\nmere `string` or `int`, and GraphQL gives you the tools to declare this\nyourself.\n\n[prettier]: https://github.com/prettier/prettier\n","readmeFilename":"README.md","keywords":["swagger","graphql","openapi","api","node"]}