{"_id":"@dreamonkey/graphql-codegen-near-operation-file","_rev":"2-9e33305e6e7f60ab8979e34dff462006","name":"@dreamonkey/graphql-codegen-near-operation-file","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@dreamonkey/graphql-codegen-near-operation-file","version":"0.1.0","description":"TODO: Add description","author":{"name":"Dreamonkey Srl","email":"info@dreamonkey.com","url":"https://dreamonkey.com"},"contributors":[{"name":"Yusuf Kandemir","email":"y.kandemir@dreamonkey.com"}],"homepage":"https://github.com/dreamonkey/graphql-codegen-stack/tree/main/packages/near-operation-file#readme","repository":{"type":"git","url":"git+https://github.com/dreamonkey/graphql-codegen-stack.git","directory":"packages/near-operation-file"},"bugs":{"url":"https://github.com/dreamonkey/graphql-codegen-stack/issues"},"license":"MIT","type":"module","sideEffects":false,"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"main":"./dist/index.cjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","peerDependencies":{"vite":"^2.0.0 || ^3.0.0 || ^4.0.0"},"devDependencies":{"@types/node":"^16.18.12","unbuild":"^1.1.1","vite":"^2.9.15"},"scripts":{"build":"unbuild","test":"echo \"TODO: Implement tests\""},"_id":"@dreamonkey/graphql-codegen-near-operation-file@0.1.0","_integrity":"sha512-GpDW9YiDCljfJ18J4ox154NwBlBdUli8tgoaLGvBKd2kRKdeF5/jAHQVz2SzUil85tDySLqAdQ/XCcjKHSXf4w==","_resolved":"/tmp/4c4b5f39cded3da8d9c4404fdbe63d2d/dreamonkey-graphql-codegen-near-operation-file-0.1.0.tgz","_from":"file:dreamonkey-graphql-codegen-near-operation-file-0.1.0.tgz","_nodeVersion":"18.14.1","_npmVersion":"9.3.1","dist":{"integrity":"sha512-GpDW9YiDCljfJ18J4ox154NwBlBdUli8tgoaLGvBKd2kRKdeF5/jAHQVz2SzUil85tDySLqAdQ/XCcjKHSXf4w==","shasum":"fe183ff787f9e33404de1dd4304850e75215845e","tarball":"https://registry.npmjs.org/@dreamonkey/graphql-codegen-near-operation-file/-/graphql-codegen-near-operation-file-0.1.0.tgz","fileCount":7,"unpackedSize":5733,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAU8LRkBwnloY6DWeYsIUdfwOsymTvRi8r5b4bBvCHR7AiAMi2LdmaZytYTzZe+aL029w9oZ7f2cntoWhEalCfsu4Q=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkAjCiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo9oQ/6AvyE3oxthqWdAMkLGLUqlcDpz1NVargaEOYevFzZIb6fA4cz\r\n2ffoiuRPesX1IZD94cAir28hq3pF0U1bsZEQiD20cKNuJw8dUsyQbCHZfedc\r\nzhH4woo8DT0GBHnLXECdUcAQS6gx8tK1wCf1nqLH+WQIFh8zXPeyIM5gf2r8\r\nuZxzdE7mO62GsVZnvpsqRA6Sf7DzMy/PWQoYLY2B/tACL9Ve2A8olXFouKPL\r\neiz+iHiTmVxhtYb5ynN2LrBhJleSmt2AacG6zEwgpQJerafCXCzI3Bk5WaxE\r\nPp0dJlCkIZF/pXDeJ2HW2/mgglRE6PQAmXwY0YZF5gkNBMAak3u+rBdnfNxw\r\nyTqHG1Pa9XmbW413kQjLpPItRoCEGZkCRpx2B9xi2VQ1VXyKNtnmKmvsma87\r\nOGzpvfLDXT44dqvxpWgIAMXcBTJkkqYSiogZKxbHKB/yiuezTAvBjcgtK7cf\r\nwLl1b5V+phe7NszyXQYxWFnde9hAFSLgBwp1xpxp918ELxO9u2Tq/faWk36s\r\nONoObWP8A0yKvLPjitEv1rw+xV+J7p5irE3cKy74GohwPDiDs+7gMSKM59g1\r\nTykgC1qA102nT9Trj8avSU9PLh/5DK8YKplivbWpYQKThew0N0OidjR8banK\r\n7U7JQ1i3wTW+leNu66xtbyH1x09ckk9BTE8=\r\n=xjh2\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"ilcallo","email":"p.caleffi@dreamonkey.com"},"directories":{},"maintainers":[{"name":"ilcallo","email":"p.caleffi@dreamonkey.com"},{"name":"mrkappa","email":"k.borghi@dreamonkey.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-codegen-near-operation-file_0.1.0_1677865121969_0.01169586168591552"},"_hasShrinkwrap":false},"0.1.1":{"name":"@dreamonkey/graphql-codegen-near-operation-file","version":"0.1.1","description":"Write your documents in `.graphql` files, then import the generated code from `.graphql` files in your code!","author":{"name":"Dreamonkey Srl","email":"info@dreamonkey.com","url":"https://dreamonkey.com"},"contributors":[{"name":"Yusuf Kandemir","email":"y.kandemir@dreamonkey.com"}],"homepage":"https://github.com/dreamonkey/graphql-codegen-stack/tree/main/packages/near-operation-file#readme","repository":{"type":"git","url":"git+https://github.com/dreamonkey/graphql-codegen-stack.git","directory":"packages/near-operation-file"},"bugs":{"url":"https://github.com/dreamonkey/graphql-codegen-stack/issues"},"license":"MIT","type":"module","sideEffects":false,"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"main":"./dist/index.cjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","peerDependencies":{"vite":"^2.0.0 || ^3.0.0 || ^4.0.0"},"devDependencies":{"@types/node":"^16.18.12","unbuild":"^1.1.1","vite":"^2.9.15"},"scripts":{"build":"unbuild","test":"echo \"TODO: Implement tests\""},"_id":"@dreamonkey/graphql-codegen-near-operation-file@0.1.1","_integrity":"sha512-e0LkYq+2KdiA44+nVvbxYn69Cbquw6lyME5x5WLcrpiCPnPB/h1yc3XDUwNZVvpNPWIGu9eX1a3Eb8vfofH4Ww==","_resolved":"/tmp/30273e2c1f05cb2a44b3053246c94e5b/dreamonkey-graphql-codegen-near-operation-file-0.1.1.tgz","_from":"file:dreamonkey-graphql-codegen-near-operation-file-0.1.1.tgz","_nodeVersion":"18.15.0","_npmVersion":"9.5.0","dist":{"integrity":"sha512-e0LkYq+2KdiA44+nVvbxYn69Cbquw6lyME5x5WLcrpiCPnPB/h1yc3XDUwNZVvpNPWIGu9eX1a3Eb8vfofH4Ww==","shasum":"7cdb3721167b6689def9dadfc76c91eea15107a7","tarball":"https://registry.npmjs.org/@dreamonkey/graphql-codegen-near-operation-file/-/graphql-codegen-near-operation-file-0.1.1.tgz","fileCount":7,"unpackedSize":6785,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCiOJBDXiol/BXyxO3S4iMvf0211cC6wbKNV47awgHAaQIhAMR16KqsIqKlYOTYMSO+zwkxwbseV+ZWsI3hki7+Do2Y"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkNW/6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoqXA//VBZypfWB1Xmvbb4K11f2pmZcSN5AbOGlYVwDwdKRjR4n8AnL\r\n0LoOFTSnyyFqlyBUxixMfx8i3i8YkqY8gUzCmTUk/ecNfqn2D3BnTCe7bIjl\r\nXH+C+sKHuh7F3K34dLmdVVrRF4622jvfv8freWNR82jUKcl+hQD5GmukHPV1\r\noifzJfRoalbY9agL2PCFhLtUSYOBUWnGpo5NY2wmNh9ubYUM/3CpMaPcQMV3\r\n869fBBl+0LG4hqe+4/dnFbqJKHNMBHBL64u+0+pYPeuOnZzbeJl+hl11h3t4\r\nXR343gQ4XvTHAhl3e6lil7o7TlvAA3o0QnZnTzeXa4N5FOT0F5wpiknVAYqq\r\n6kUx5RhuwBZRxgTU5T1Z53pjFdDc0Vuab8gpHgydoWwW6KS2AATqQgtmvkHr\r\n+U20ANjvuIeOS60f1pnllzCPPN5RSeuuJ5DrB/faIYQZrf+MCCB8cugtDE5r\r\nODufIYDNX4NUSDw3WdlPp/oe/uE8ufVg1aWWK2sUCJ8pa2Us7v1fNOfFegD5\r\ne7cQZvpsQeIhRuxt6K0KuopGgjjfb6Sw1C2x592QnhjOog4DQOon1mO7cQQZ\r\nolyWPt3gTeoJRN8B/kLIv9ffET90tgS0TfoBjecyGez0atpYbrdyiEPRSd5t\r\na5ijC+R5vhC/FVj0S7w2CUheG4QZgOs9RmU=\r\n=vmsi\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"ilcallo","email":"p.caleffi@dreamonkey.com"},"directories":{},"maintainers":[{"name":"ilcallo","email":"p.caleffi@dreamonkey.com"},{"name":"mrkappa","email":"k.borghi@dreamonkey.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-codegen-near-operation-file_0.1.1_1681223674500_0.5710515065746524"},"_hasShrinkwrap":false},"0.1.2":{"name":"@dreamonkey/graphql-codegen-near-operation-file","version":"0.1.2","description":"Write your documents in `.graphql` files, then import the generated code from `.graphql` files in your code!","author":{"name":"Dreamonkey Srl","email":"info@dreamonkey.com","url":"https://dreamonkey.com"},"contributors":[{"name":"Yusuf Kandemir","email":"y.kandemir@dreamonkey.com"}],"homepage":"https://github.com/dreamonkey/graphql-codegen-stack/tree/main/packages/near-operation-file#readme","repository":{"type":"git","url":"git+https://github.com/dreamonkey/graphql-codegen-stack.git","directory":"packages/near-operation-file"},"bugs":{"url":"https://github.com/dreamonkey/graphql-codegen-stack/issues"},"license":"MIT","type":"module","sideEffects":false,"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"main":"./dist/index.cjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","peerDependencies":{"vite":"^2.0.0 || ^3.0.0 || ^4.0.0"},"devDependencies":{"@types/node":"^16.18.12","unbuild":"^2.0.0","vite":"^2.9.16"},"scripts":{"build":"unbuild","test":"echo \"TODO: Implement tests\""},"_id":"@dreamonkey/graphql-codegen-near-operation-file@0.1.2","_integrity":"sha512-ZqbIcaaQbL8cnKznm1Nsy7tDVTMV0EnWK/I8RFGwVq1LDrJmPqEHC+SmDdsxWrZPvYB3GYiCPabX+iu9iL3sPg==","_resolved":"/tmp/09688056291d8c19b189af1923a63e7b/dreamonkey-graphql-codegen-near-operation-file-0.1.2.tgz","_from":"file:dreamonkey-graphql-codegen-near-operation-file-0.1.2.tgz","_nodeVersion":"18.15.0","_npmVersion":"9.5.0","dist":{"integrity":"sha512-ZqbIcaaQbL8cnKznm1Nsy7tDVTMV0EnWK/I8RFGwVq1LDrJmPqEHC+SmDdsxWrZPvYB3GYiCPabX+iu9iL3sPg==","shasum":"f8450e311ee7afbe83f723cd3704d5d4c6e8025d","tarball":"https://registry.npmjs.org/@dreamonkey/graphql-codegen-near-operation-file/-/graphql-codegen-near-operation-file-0.1.2.tgz","fileCount":9,"unpackedSize":7013,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDPV2lrP648+qzc4uaycXtTRd6l1DenwSEcrNwpCNkzuwIhAJdBb0RCCqUW04ZvFNd/K/jQ1806nZVDvjNHC7GxF8Wx"}]},"_npmUser":{"name":"ilcallo","email":"p.caleffi@dreamonkey.com"},"directories":{},"maintainers":[{"name":"ilcallo","email":"p.caleffi@dreamonkey.com"},{"name":"mrkappa","email":"k.borghi@dreamonkey.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-codegen-near-operation-file_0.1.2_1698231142198_0.05661430304951787"},"_hasShrinkwrap":false}},"time":{"created":"2023-03-03T17:38:41.903Z","0.1.0":"2023-03-03T17:38:42.172Z","modified":"2023-10-25T10:52:22.689Z","0.1.1":"2023-04-11T14:34:34.722Z","0.1.2":"2023-10-25T10:52:22.496Z"},"maintainers":[{"name":"ilcallo","email":"p.caleffi@dreamonkey.com"},{"name":"mrkappa","email":"k.borghi@dreamonkey.com"}],"description":"Write your documents in `.graphql` files, then import the generated code from `.graphql` files in your code!","homepage":"https://github.com/dreamonkey/graphql-codegen-stack/tree/main/packages/near-operation-file#readme","repository":{"type":"git","url":"git+https://github.com/dreamonkey/graphql-codegen-stack.git","directory":"packages/near-operation-file"},"contributors":[{"name":"Yusuf Kandemir","email":"y.kandemir@dreamonkey.com"}],"author":{"name":"Dreamonkey Srl","email":"info@dreamonkey.com","url":"https://dreamonkey.com"},"bugs":{"url":"https://github.com/dreamonkey/graphql-codegen-stack/issues"},"license":"MIT","readme":"# @dreamonkey/graphql-codegen-near-operation-file\n\n<!-- TODO: Create a new package for(or convert this package to) an opinionated, ready to use GraphQL Code Generator preset -->\n\nWrite your documents in `.graphql` files, then import the generated code from `.graphql` files in your code!\n\n## Installation\n\nMake sure you have installed and configured GraphQL Code Generator and the near-operation-file preset first:\n\n- [GraphQL Code Generator | Installation](https://the-guild.dev/graphql/codegen/docs/getting-started/installation)\n- [GraphQL Code Generator | Near Operation File Preset](https://the-guild.dev/graphql/codegen/docs/presets/near-operation-file)\n\nInstall the package:\n\n```shell\npnpm add -D @dreamonkey/graphql-codegen-near-operation-file\n```\n\n### GraphQL Code Generator config\n\nConfigure the near-operation-file preset to use `.graphql.ts` extension:\n\n```ts\n// codegen.ts\nimport type { CodegenConfig } from '@graphql-codegen/cli';\n\nconst config: CodegenConfig = {\n  // ...\n  generates: {\n    // ...\n    'src/': {\n      preset: 'near-operation-file',\n      presetConfig: {\n        extension: '.graphql.ts', // <--- This is the important part\n        // ...\n      },\n      // ...\n    },\n  },\n  // ...\n};\n\nexport default config;\n```\n\n### .gitignore\n\nAdd the following line to your `.gitignore` file:\n\n```gitignore\n# GraphQL Code Generator\nsrc/**/*.graphql.ts\n```\n\nIf you are using a different folder instead of `src/` in `codegen.ts > generates`, adjust the path above accordingly.\n\n### Vite config\n\nAdd the plugin to your Vite config:\n\n```ts\n// vite.config.ts\nimport { defineConfig } from 'vite';\nimport graphqlNearOperationFile from '@dreamonkey/graphql-codegen-near-operation-file';\n\nexport default defineConfig({\n  plugins: [\n    // ...\n    graphqlNearOperationFile(),\n  ],\n});\n```\n\n### Quasar Framework (@quasar/app-vite)\n\n(_App Extension is coming soon_) <!-- TODO: Link the app extension when it's ready -->\nIf you are not using the App Extension, you can add the plugin to your `quasar.config.js`:\n\n```js\n// quasar.config.js\nconst { configure } = require('quasar/wrappers');\n\nmodule.exports = configure(function (/* ctx */) {\n  return {\n    // ...\n    build: {\n      // ...\n      vitePlugins: [\n        // ...\n        ['@dreamonkey/graphql-codegen-near-operation-file'],\n        // ...\n      ],\n    },\n    // ...\n  };\n});\n```\n\n## Usage\n\nDefine your documents in `.graphql` files:\n\n```graphql\n# src/composables/posts.graphql\nfragment PostDetails on Post {\n  id\n  title\n  body\n}\n\nquery getPosts {\n  posts {\n    ...PostDetails\n  }\n}\n```\n\nGraphQL Code Generator will generate the corresponding code as `.graphql.ts` files.\n\nThen, you will be able to import the generated code from `.graphql` files in a natural fashion:\n\n```ts\n// src/composables/posts.ts\nimport {\n  useGetPostsQuery,\n  GetPostsDocument,\n  PostDetailsFragment,\n} from './posts.graphql';\n\n// Use the generated code\n```\n\n## Donate\n\nIf you appreciate the work that went into this package, please consider [donating](https://github.com/sponsors/dreamonkey).\n","readmeFilename":"README.md"}