{"_id":"gql-dedup","_rev":"6-911cc88d42096d6b1d818c6c813e85d3","name":"gql-dedup","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"gql-dedup","version":"1.0.0","description":"A graphql-tag improvement library which de-duplicates fragments.","homepage":"https://github.com/DmitryKoterov/gql-dedup#readme","author":{"name":"Dmitry Koterov"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/DmitryKoterov/gql-dedup.git"},"bugs":{"url":"https://github.com/DmitryKoterov/gql-dedup/issues"},"keywords":["graphql","tag","dedup","deduplicate","fragments","apollo","gql"],"main":"./dist/index.js","typings":"dist/index.d.ts","scripts":{"build":"tsc","dev":"tsc --watch","test":"jest","clean":"rm -rf dist node_modules yarn.lock package-lock.json"},"devDependencies":{"@types/jest":"^26.0.3","jest":"^26.1.0","ts-jest":"^26.1.1","typescript":"^3.9.2","graphql-tag":"^2.10.3","graphql":"^14.5.4"},"peerDependencies":{"graphql-tag":"^2.0.0","graphql":"^14.0.0"},"dependencies":{},"gitHead":"e85de8120897214b225e58445002d4b73736ad64","_id":"gql-dedup@1.0.0","_nodeVersion":"12.9.1","_npmVersion":"6.10.2","dist":{"integrity":"sha512-RlIoKgSdIzvJiJJhThYK1JrZSQnj68qJ4BZ4ZyFb+GU51Kl1Qhrr2Nt+u/d/nPLZCVzp6cwLcNwAdXG+SBaG0g==","shasum":"2f6dc42200eafe63aad30c90f83d7dc05c8ae98a","tarball":"https://registry.npmjs.org/gql-dedup/-/gql-dedup-1.0.0.tgz","fileCount":7,"unpackedSize":6812,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe9W6MCRA9TVsSAnZWagAAlaQP/2nAQ0LAlA4zFAQVp7zb\nYfl7xj73ZpHnT7wQj6NoEEzlyZ8RxNiF09usdf3cQfewe/iSoJfjhx0W686q\ncKWA3Aox5my6NcBsyPMgyd+1PqYw0j8Ry+i5Lv5FCnb6JcxUNRYKLy0YN4j1\nw/5yHPFtvZ87x9pdKythr+YTb1+MnwVpLruz+yPzqNemfINNbhbf3GkPr0iv\nbhc8D4Z+f0U2p0ZUgATEBFUX2+BgaBonL+pMKnSJDDxa0tG6eo+SKXuy3MyB\nVqoOvlDGA47lsQpqnAmhV/Spt9ZkHTO76NYMlcsO8GNqKPh/mF5wGWs/v5uC\n/qYaUybCa3e8IdnPGnshxlCKxu4CfpdJg+Y5R6MSkuktNi9dggGaMvaj7VHT\nRv/l4L+8LHluiVwa/K4eQ4QPFh4gQklHgyyF9Gx4I4oex0Y4OljUWBYsui8w\ncPk0dqmJHXVRNKZn2ygURiELYzxH9jh3ZehNcH1Bj2SjihjZJb68Stb3U24M\nH3pa/xtS2nikJMq/tC01hejT+MgUY+xtiYnyFLyIV221LQlI9ni4GI2M1lwA\nwbAkBoLcCAByyGUGXociqRJ8zjKqfour0hy/nKmyUQojSHOec0LLZn+gV0LG\n5Vcez956POa4vdAXPDyDqUn8yRhzphSETLVzDIqsAJcRHme9pj7dsMN+hqJN\ny65g\r\n=/Rm+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEpJCmF7pgKyTnXl2DVRv+UDx8zP52NCE1JAuyZj3tA1AiBe3ElNbayIPGvnkwGJSHMVe8q5XlRNh4jIswdUNmf5Wg=="}]},"maintainers":[{"name":"dmitry-koterov","email":"dmitry.koterov@gmail.com"}],"_npmUser":{"name":"dmitry-koterov","email":"dmitry.koterov@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gql-dedup_1.0.0_1593142924143_0.6041641197128951"},"_hasShrinkwrap":false},"1.0.1":{"name":"gql-dedup","version":"1.0.1","description":"A graphql-tag improvement library which de-duplicates fragments.","homepage":"https://github.com/DmitryKoterov/gql-dedup#readme","author":{"name":"Dmitry Koterov"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/DmitryKoterov/gql-dedup.git"},"bugs":{"url":"https://github.com/DmitryKoterov/gql-dedup/issues"},"keywords":["graphql","tag","dedup","deduplicate","fragments","apollo","gql"],"main":"./dist/index.js","typings":"dist/index.d.ts","scripts":{"build":"tsc","dev":"tsc --watch","test":"jest","clean":"rm -rf dist node_modules yarn.lock package-lock.json"},"devDependencies":{"@types/jest":"^26.0.3","jest":"^26.1.0","ts-jest":"^26.1.1","typescript":"^3.9.2","graphql-tag":"^2.10.3","graphql":"^14.5.4"},"peerDependencies":{"graphql-tag":"^2.0.0","graphql":"^14.0.0"},"dependencies":{},"gitHead":"19d4e2ce0e7d2952ace48e3af41f35d47a0ec1c5","_id":"gql-dedup@1.0.1","_nodeVersion":"12.9.1","_npmVersion":"6.10.2","dist":{"integrity":"sha512-hHMMD6XW7UhGFducj/aHlpiZtrlz8BbBFSl0KBWXilI8T6o4Ju5NPTGp6xKAW1gtj9HP3TTQE4AH+GLc1pfI+g==","shasum":"8ffac390c6a6f34ba13aeb1a3a0f593553a4cb0b","tarball":"https://registry.npmjs.org/gql-dedup/-/gql-dedup-1.0.1.tgz","fileCount":7,"unpackedSize":7063,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe9nW6CRA9TVsSAnZWagAAMmMP/3gV/JVp3m58F5OhaLB6\nAWtKGf12CEiA756PZbHCQSUyS1Y10NwBf/OwNoGw/aJV8g2Iri68I1cttCyU\nqDPHd6CO9wQX9jooE/a/ikL3O1H1YldMiKzEP/AOq++t6cKMPGcvLqRRzxrX\nucEVq/NQLP6OQ7fNKT4I5fEYCuFKYjIDRDa/7xigeQKO1HU3Y46pxhk51zmq\nq10Zbyk4Iu1WHSuuUVGdCjclZp9WN5KyeZRWLrNZaXuwqFQesfgG8upxwOZA\nDhH5NeYStZkSK66OvMASK3V4QU69ttT8XtC9nCtvhRNLa909Si7CKza02mUH\nD1KZ6RtDXFuIh+A60Lg4WBbquRtoC0A3i2+G/KkTsXLmQgxYtVs3ItJDMChm\ncA3afbrrqQhOqa/uKRhLYhUWzCD16qETSikLPG6RVwaXQw7Xb3qjxYQbzOtO\nkr3isF0dTaVZxNdmqsIOFvcRsmMwBMRpRT/mHLpTzwa35xd2HbNeMDwmMr+c\nHyZ4xusnADklWApIvhbimaIjZmH/lO7hw0m6y7HLZqFb5T2fdWmjsrJ2rhFV\nttY8uqQP/Vbi7OrEIL5W72MDxuhZEUCPjh1T2y74qjW8CxY7YqOP8z1ed09I\nLWlUfsB4otR85ZZQvfwOrhdYKOAEbRvM1Tfs7LjYm4BFECALv3noVvKWCa1C\nk/bp\r\n=Hitr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBCY77CxlJ7NASkSvu4AcqISjhg/aU37ie7JxHzVDYA0AiEA1mxw4OxnBUOkx8qkeSp6BZPFBkB7pASPJa4WndMQwrQ="}]},"maintainers":[{"name":"dmitry-koterov","email":"dmitry.koterov@gmail.com"}],"_npmUser":{"name":"dmitry-koterov","email":"dmitry.koterov@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gql-dedup_1.0.1_1593210297717_0.7529193172499988"},"_hasShrinkwrap":false},"1.0.2":{"name":"gql-dedup","version":"1.0.2","description":"A graphql-tag improvement library which de-duplicates fragments.","homepage":"https://github.com/dimikot/gql-dedup#readme","author":{"name":"Dimi Kot"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/dimikot/gql-dedup.git"},"bugs":{"url":"https://github.com/dimikot/gql-dedup/issues"},"keywords":["graphql","tag","dedup","deduplicate","fragments","apollo","gql"],"main":"./dist/index.js","typings":"dist/index.d.ts","scripts":{"build":"tsc","dev":"tsc --watch","test":"jest","clean":"rm -rf dist node_modules yarn.lock package-lock.json","deploy":"npm run build && npm test && npm publish"},"devDependencies":{"@types/jest":"^26.0.3","jest":"^26.1.0","ts-jest":"^26.1.1","typescript":"^4.8","graphql-tag":"^2.10.3","graphql":"^14.5.4"},"peerDependencies":{"graphql-tag":"^2.0.0","graphql":"^14.0.0"},"dependencies":{},"_id":"gql-dedup@1.0.2","gitHead":"2e78a64b1f934394f6b57f987a777ad1ae0bee85","_nodeVersion":"20.5.1","_npmVersion":"9.8.0","dist":{"integrity":"sha512-x2cjkcHJ/yruW7UOMmNjHZ77yaQWcSsjNV/aa0kbAoc/Vri3PquzQK41V3I3+lHqQkV7hAM4MJ6AjZZ8fIwdnQ==","shasum":"efadbb03090fc9d77eedfa016b7f726456d686f6","tarball":"https://registry.npmjs.org/gql-dedup/-/gql-dedup-1.0.2.tgz","fileCount":7,"unpackedSize":7113,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCHx/Z1FF3cUtznHSK2sLTnHCxm0VS7dVtg+IN6ydiJjAIhALKdPWlh8RlTvjOePE9YnzvMR0TI1m3m9yJ5EqHmErQE"}]},"_npmUser":{"name":"dmitry-koterov","email":"dmitry.koterov@gmail.com"},"directories":{},"maintainers":[{"name":"dmitry-koterov","email":"dmitry.koterov@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gql-dedup_1.0.2_1696994908668_0.5071075304242052"},"_hasShrinkwrap":false},"1.0.3":{"name":"gql-dedup","version":"1.0.3","description":"A graphql-tag improvement library which de-duplicates fragments.","homepage":"https://github.com/dimikot/gql-dedup#readme","author":{"name":"Dimi Kot"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/dimikot/gql-dedup.git"},"bugs":{"url":"https://github.com/dimikot/gql-dedup/issues"},"keywords":["graphql","tag","dedup","deduplicate","fragments","apollo","gql"],"main":"./dist/index.js","typings":"dist/index.d.ts","scripts":{"build":"tsc","dev":"tsc --watch","test":"jest","clean":"rm -rf dist node_modules yarn.lock package-lock.json","deploy":"npm run build && npm test && npm publish"},"devDependencies":{"@types/jest":"^26.0.3","jest":"^26.1.0","ts-jest":"^26.1.1","typescript":"^4.8","graphql-tag":"^2.10.3","graphql":"^14.5.4"},"peerDependencies":{"graphql-tag":"^2.0.0","graphql":"^14.0.0"},"dependencies":{},"_id":"gql-dedup@1.0.3","gitHead":"c0244f4fde75a8b73b7b34f2cd30d0de937495ec","_nodeVersion":"20.5.1","_npmVersion":"9.8.0","dist":{"integrity":"sha512-HWRab5TVHZ7yhtdSRO9oIFOItNOSFmQJYP2MMW/FRwC8vWmMSKjL/J9kiVbPi8eXBByRaCCoAtWwAtF7L493bg==","shasum":"79d6c097b732d705f53ffe37c808c85510bfed72","tarball":"https://registry.npmjs.org/gql-dedup/-/gql-dedup-1.0.3.tgz","fileCount":7,"unpackedSize":7113,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBzxuFgKvQCy/UWV486uBpG2oRjWsyStEYmpxfdFDWHZAiA6VAzxYEX5v5DTN7phY4bl6lb7cOVN9HyY9eIvSeNo1Q=="}]},"_npmUser":{"name":"dimikot","email":"dimi.kot.code@gmail.com"},"directories":{},"maintainers":[{"name":"dimikot","email":"dimi.kot.code@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gql-dedup_1.0.3_1696998271895_0.6633682380881112"},"_hasShrinkwrap":false}},"time":{"created":"2020-06-26T03:42:04.143Z","1.0.0":"2020-06-26T03:42:04.309Z","modified":"2023-10-11T04:24:32.240Z","1.0.1":"2020-06-26T22:24:57.918Z","1.0.2":"2023-10-11T03:28:28.853Z","1.0.3":"2023-10-11T04:24:32.074Z"},"maintainers":[{"name":"dimikot","email":"dimi.kot.code@gmail.com"}],"description":"A graphql-tag improvement library which de-duplicates fragments.","homepage":"https://github.com/dimikot/gql-dedup#readme","keywords":["graphql","tag","dedup","deduplicate","fragments","apollo","gql"],"repository":{"type":"git","url":"git+https://github.com/dimikot/gql-dedup.git"},"author":{"name":"Dimi Kot"},"bugs":{"url":"https://github.com/dimikot/gql-dedup/issues"},"license":"MIT","readme":"# gql-dedup: a graphql-tag improvement library which de-duplicates fragments\n\nWell-known Apollo's [graphql-tag](https://github.com/apollographql/graphql-tag)\nlibrary hasn't been updated for a long time, and there has been several PRs got\nstuck there.\n\nThe current library solves one common weakness of graphql-tag: it allows to\nrefer fragments multiple times and have them de-duplicated in the query.\n\n## Example\n\nImagine we have a common FragDate fragment which two other fragments,\nFragCreated and FragUpdated, depend on. Then, with the default graphql-tag\nlibrary, using of **both** FragCreated and FragUpdated in the same query won't\nbe possible since FragDate would be included twice, and we'd get a server-side\nerror.\n\nHere comes graphql-tag: it de-duplicates fragments each time they're used.\n\n```ts\nimport gql from \"gql-dedup\";\n\nconst FragDate = gql`\n  fragment FragDate on User {\n    day\n    month\n    year\n  }\n`;\n\nconst FragCreated = gql`\n  fragment FragCreated on User {\n    created {\n      ...FragDate\n    }\n  }\n  ${FragDate}\n`;\n\nconst FragUpdated = gql`\n  fragment FragUpdated on User {\n    updated {\n      ...FragDate\n    }\n  }\n  ${FragDate}\n`;\n\nconst Query = gql`\n  query User {\n    viewer {\n      ...FragCreated\n      ...FragUpdated\n    }\n  }\n  ${FragCreated}\n  ${FragUpdated}\n`;\n```\n\nResult (notice that FragDate is included only once):\n\n```graphql\nquery User {\n  viewer {\n    ...FragCreated\n    ...FragUpdated\n  }\n}\nfragment FragCreated on User {\n  created {\n    ...FragDate\n  }\n}\nfragment FragDate on User {\n  day\n  month\n  year\n}\nfragment FragUpdated on User {\n  updated {\n    ...FragDate\n  }\n}\n```\n","readmeFilename":"README.md"}