{"_id":"@inversable/codegen-subtypes","_rev":"1-78d004d8d479ad4458760fb6ca98a4b6","name":"@inversable/codegen-subtypes","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@inversable/codegen-subtypes","version":"1.0.0","description":"Plugin for GraphQL Code Generator that creates subtypes for each operation, similar to the output of Apollo codegen. ","main":"dist/index.js","scripts":{"build":"tsc"},"repository":{"type":"git","url":"https://gitlab.inversable.com/toolbox/hasura/codegen-subtypes"},"keywords":["graphql","code","generator","apollo","codegen","types","subtypes"],"author":{"name":"Inversable"},"license":"SEE LICENSE IN LICENSE","dependencies":{"@graphql-codegen/plugin-helpers":"^4.0.0","@graphql-codegen/visitor-plugin-common":"^3.0.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0"},"devDependencies":{"@graphql-tools/apollo-engine-loader":"^7.3.26","typescript":"^4.9.3"},"types":"./dist/index.d.ts","gitHead":"d321827e2c2154946076067b0f9a3c1ac86f4727","_id":"@inversable/codegen-subtypes@1.0.0","_nodeVersion":"18.12.1","_npmVersion":"8.19.3","dist":{"integrity":"sha512-dWFtLdujNzMK8NHILnDmQzC/vZHnuA5K4o29Q+hl2HqImdwyAVXdC4+WJ5jPmJbEOcAe2LMxkfTPtDugErsUsQ==","shasum":"d37594b59f8af15befda58032f1b538276cfdc55","tarball":"https://registry.npmjs.org/@inversable/codegen-subtypes/-/codegen-subtypes-1.0.0.tgz","fileCount":9,"unpackedSize":48234,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDLX+Cid16jQUnKYYTXLUKkgbCiE+UNovwoqcRCRb1WsAIgaSRWUmgKItB6LNDHcldwfmys55Bc69cF2pV2AOrlB5E="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6mYIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmquOg/+MsPMcz+6eDgufz+0WaFu8AxuIIU2LL/Is+aLNe0UZVwrAjJW\r\n+IjokTG39gwwglCQjXbiZhWjnCMazLaW/qqKlKNhfJ5ZpF3b707D9Y/Th2TM\r\nZXJ5YQBTWC4iek7SlK6QL6wd5H6ApwRh7B9ZON5/lI6zotUa4LHr0Ly19rJE\r\n0luB5Vdruk0efrY4tAf4wHPHe3mljOt4x/VCDJo4A/22qP0NbrPywBDcgEyK\r\nOGxCQB6+5Y3e4SqQv2lmOQFHtVm2TOMkIJnl0pkVvxBEK1Dl6Cq8eMF2/sS7\r\nL9VGFwI6S+o2Utll1Rtn5GLNd0jUh45q5L5iJbnmJuX5XPOoiutU6SpdTfn8\r\nspSDp80e00y95aycrc8I5S/3+I3cbRnNh82+PQfagyXGSIWZpFHuNYThXucG\r\n+G+8YG5B15IU0hxZX5dOli2EojXxFbET3OmGGNLaq47MaIAU6p7D+J+oLhW5\r\nNtZwGpVFKxVOvdSRhwAcANJGJVUCgK2AShGR9qOzmW1EOIlH+SL8UaV2G0qs\r\nPsfG3gIsIK30L9d1vieYGLoIB3UhJoLuPvHsOKn0jro7WXTXgVr9sRlKQeE4\r\nnAmDMdaGjRjN2kL0vSmSU5+7LjaXK3Z2ZlgdVqP3EPwML5KDZrsHtZ05/wEb\r\ntxNGRD6RyxnPf/RdRV3bEAMFp7zdTdqWNqg=\r\n=vrnR\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"inversable","email":"info@inversable.com"},"directories":{},"maintainers":[{"name":"inversable","email":"info@inversable.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/codegen-subtypes_1.0.0_1676305928312_0.40463060404399886"},"_hasShrinkwrap":false},"1.0.1":{"name":"@inversable/codegen-subtypes","version":"1.0.1","description":"Plugin for GraphQL Code Generator that creates subtypes for each operation, similar to the output of Apollo codegen. ","main":"dist/index.js","scripts":{"build":"tsc"},"repository":{"type":"git","url":"https://gitlab.inversable.com/toolbox/hasura/codegen-subtypes"},"keywords":["graphql","code","generator","apollo","codegen","types","subtypes"],"author":{"name":"Inversable"},"license":"SEE LICENSE IN LICENSE","dependencies":{"@graphql-codegen/plugin-helpers":"^4.0.0","@graphql-codegen/visitor-plugin-common":"^3.0.0"},"peerDependencies":{"graphql":"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0"},"devDependencies":{"@graphql-tools/apollo-engine-loader":"^7.3.26","typescript":"^4.9.3"},"types":"./dist/index.d.ts","gitHead":"5ed1d40f50e0b9db051188e5a848f16c6380d143","_id":"@inversable/codegen-subtypes@1.0.1","_nodeVersion":"18.13.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-s70g/M5RyxFfNibcM8e1CZ7A9maSsE16QQjY2gKxvp8I62ZyYh8gViY4rR5moauW9H1vpGjGaFhXJY11EeyVeQ==","shasum":"8730fcb1f65f816b885bed515d9eb459f9558811","tarball":"https://registry.npmjs.org/@inversable/codegen-subtypes/-/codegen-subtypes-1.0.1.tgz","fileCount":6,"unpackedSize":30343,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC+vnAIhRgHPCv8ZM1jpORnlIWA64tQZ9LirptII+LGwAIgBYxm1QQ5FhgE0sNnjUNlcpis0DvkHjCSvI5YVIKM2Yg="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj61bCACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrFIg//W9a/HtUBaq7s8EDGKv+b1dLRhzuoJ+p4lg11Mv44YxA4U9S9\r\nLJIMp1KWqqGCyNXHSwHzUrujOl1fVKDEFfqJHDKwHvLE7GCJ54iJqVyYfITK\r\nOf6qH2/X0+JvE92nXqTesGEjCAm12uGaiFIo9McGM5xzkCKQjkWz6M6C8R0L\r\nfFhqFhCGmFdpmRbreJJs52ws2Q2xCzA+mrj5++boNw/eiChc8G/0G6PQRLjt\r\nu7Y/L5oelinrU1hWWpxGiK2Vf3UcY8z73Ersr820JurTKS9Jjqhm6pwVD1Zf\r\nSfzHxWTZsXrYfg3X41gokrUEjqv4sxDDnOGSaL3KH1pW9pn897yFHzmFhiXf\r\nb6xvdV4dnwqvL8tiylVBhUTa6+VlTuXON9GUHdb6xDHlw+uMGmkkZFNAlWu9\r\nGhu4SoKGEfRGYNDj8a356XH1YSS1eKGc29OiMmHQrPWi7nrfI4ZJvghjlGri\r\n/WuXYMYz3IU8WugUJYV7oPDhufAFhY82/iVU1n2xwXzXF1IM3juFKJ0yCoR0\r\ni318SDPMlRf6n/w+5jTUSPxJzq2G7iY9r02t32CJCOI1M5BD7BjrcQxnxrEL\r\nihJ3wsIEtwlM/ezKd8RwoRJfCm1Rzz8ZrURL3g9bw+emT8mB1Axw9NXIXnfY\r\nyKh5+kYVYrjSW+H9Ttkz1enM+CRzCyDBy0s=\r\n=gQc9\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"inversable","email":"info@inversable.com"},"directories":{},"maintainers":[{"name":"inversable","email":"info@inversable.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/codegen-subtypes_1.0.1_1676367553976_0.3289448163811193"},"_hasShrinkwrap":false}},"time":{"created":"2023-02-13T16:32:08.148Z","1.0.0":"2023-02-13T16:32:08.476Z","modified":"2023-02-14T09:39:14.276Z","1.0.1":"2023-02-14T09:39:14.182Z"},"maintainers":[{"name":"inversable","email":"info@inversable.com"}],"description":"Plugin for GraphQL Code Generator that creates subtypes for each operation, similar to the output of Apollo codegen. ","keywords":["graphql","code","generator","apollo","codegen","types","subtypes"],"repository":{"type":"git","url":"https://gitlab.inversable.com/toolbox/hasura/codegen-subtypes"},"author":{"name":"Inversable"},"license":"SEE LICENSE IN LICENSE","readme":"# Codegen Subtypes\nCodegen Subtypes is a plugin for [GraphQL Code Generator](https://the-guild.dev/graphql/codegen). The plugin generates subtypes for your GraphQL operations. The subtypes are very similar to the subtypes [Apollo tooling](https://github.com/apollographql/apollo-tooling) generates.\n\n\n## Example\nExample query:\n```ts\nquery getContexts($userId: uuid!) {\n  auth_contexts {\n    id\n    name\n    AccountRoles(where: {account: {user_id: {_eq: $userId}}}) {\n      id\n      role\n    }\n  }\n}\n```\nDefault GraphQL Code Generator output (typescript-operations plugin)\n```ts\nexport type get_contexts_query = { \n    auth_contexts: Array<{ \n        __typename: 'auth_contexts', \n        id: any, \n        name: string | null, \n        AccountRoles: Array<{ \n            __typename: 'auth_account_roles',\n             id: any, role: string \n        }>\n    }> \n};\n```\n\n\nAdditional types generated with Codegen Subtypes:\n```ts\nexport type getContexts = get_contexts_query;\nexport type getContexts_auth_contexts = NonNullable<(NonNullable<get_contexts_query['auth_contexts']>)[number]>;\nexport type getContexts_auth_contexts_AccountRoles = NonNullable<(NonNullable<NonNullable<(NonNullable<get_contexts_query['auth_contexts']>)[number]>['AccountRoles']>)[number]>;\n```\n\n\n## How to enable\nAdd package:\n```sh\nnpm install -D @inversable/codegen-subtypes\n```\nAdd `@inversable/codegen-subtypes` as a plugin to your `codegen.ts`.","readmeFilename":"README.md"}