{"_id":"@atmina/urql-custom-scalars-exchange","_rev":"3-977e11cdf5f419851c38f4ec9fac124a","name":"@atmina/urql-custom-scalars-exchange","dist-tags":{"latest":"1.2.0"},"versions":{"1.1.0":{"name":"@atmina/urql-custom-scalars-exchange","version":"1.1.0","author":{"name":"Christian Lentfort"},"license":"MIT","_id":"@atmina/urql-custom-scalars-exchange@1.1.0","maintainers":[{"name":"atmina-owner","email":"info@atmina.de"}],"dist":{"shasum":"90cb5bb2584f24a523cc8adc657456e7efc1ac8a","tarball":"https://registry.npmjs.org/@atmina/urql-custom-scalars-exchange/-/urql-custom-scalars-exchange-1.1.0.tgz","fileCount":16,"integrity":"sha512-0LlnwIvLmk4ea0QgYLFNhBXdX+oC0PbD9veQkh7gyV820Wuh61gZTKzW1bKxYvqUh5QdgURwB5YvbomWfXEFuA==","signatures":[{"sig":"MEUCIQDhcxnLcxv4fSij6sF8Zpg8ozFt3ygDeXlV0Ls1l9IPUwIgWM1AVVUoRoq2+cxIxOImVO+G3PerBDXgNsKyEYqAy3o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":109960},"main":"dist/index.js","husky":{"hooks":{"pre-commit":"tsdx lint"}},"module":"dist/urql-custom-scalars-exchange.esm.js","engines":{"node":">=16.0.0"},"gitHead":"35ed31ee21084f43cf563351a7c0cf7541cb6a9c","scripts":{"lint":"tsdx lint","test":"tsdx test","build":"tsdx build","start":"tsdx watch","prepare":"tsdx build --transpileOnly"},"typings":"dist/index.d.ts","_npmUser":{"name":"atmina-owner","email":"info@atmina.de"},"prettier":{"semi":true,"printWidth":80,"singleQuote":true,"trailingComma":"es5"},"_npmVersion":"10.7.0","description":"urql exchange to allow mapping of custom scalar types","directories":{},"_nodeVersion":"20.15.0","_hasShrinkwrap":false,"packageManager":"yarn@4.4.0+sha512.91d93b445d9284e7ed52931369bc89a663414e5582d00eea45c67ddc459a2582919eece27c412d6ffd1bd0793ff35399381cb229326b961798ce4f4cc60ddfdb","devDependencies":{"tsdx":"^0.14.1","husky":"^4.2.5","tslib":"^2.4.0","wonka":"^6.0.0","graphql":"^16.0.0","@urql/core":"^4.0.0","typescript":"^4.7.4","graphql-tag":"^2.12.6"},"peerDependencies":{"wonka":"^4.0.14 || ^6.0.0","graphql":"^15.3.0 || ^16.0.0","@urql/core":"^1.12.3 || ^2.0.0 || ^3.0.0 || ^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/urql-custom-scalars-exchange_1.1.0_1726664700553_0.6993080704909109","host":"s3://npm-registry-packages"}},"1.1.1":{"name":"@atmina/urql-custom-scalars-exchange","version":"1.1.1","author":{"name":"Christian Lentfort"},"license":"MIT","_id":"@atmina/urql-custom-scalars-exchange@1.1.1","maintainers":[{"name":"atmina-owner","email":"info@atmina.de"}],"dist":{"shasum":"89fb6b7b27d53fef98f94020cbb4e51921152c0d","tarball":"https://registry.npmjs.org/@atmina/urql-custom-scalars-exchange/-/urql-custom-scalars-exchange-1.1.1.tgz","fileCount":16,"integrity":"sha512-sWYBna/Rg7h9FFJ908/mqg3sulYpiYq6uqac4lqqaLd0aY/KZfTxEHIrMd3UftVd4km6L5goIvDUYDdFjc+FPg==","signatures":[{"sig":"MEYCIQCSd8XQ8hevsAYgjcmduzWFzr2TbCcDPk9Touwp0X2VjQIhAO/qM2dzIRdRGOf3YQ2DcYmgFaUSOMEfMGtj1GHujOa1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":109970},"main":"dist/index.js","husky":{"hooks":{"pre-commit":"tsdx lint"}},"module":"dist/urql-custom-scalars-exchange.esm.js","engines":{"node":">=16.0.0"},"gitHead":"d02005af1ee5ae21b84adfae54da7889133efd3a","scripts":{"lint":"tsdx lint","test":"tsdx test","build":"tsdx build","start":"tsdx watch","prepare":"tsdx build --transpileOnly"},"typings":"dist/index.d.ts","_npmUser":{"name":"atmina-owner","email":"info@atmina.de"},"prettier":{"semi":true,"printWidth":80,"singleQuote":true,"trailingComma":"es5"},"_npmVersion":"10.7.0","description":"urql exchange to allow mapping of custom scalar types","directories":{},"_nodeVersion":"20.15.0","_hasShrinkwrap":false,"packageManager":"yarn@4.4.0+sha512.91d93b445d9284e7ed52931369bc89a663414e5582d00eea45c67ddc459a2582919eece27c412d6ffd1bd0793ff35399381cb229326b961798ce4f4cc60ddfdb","devDependencies":{"tsdx":"^0.14.1","husky":"^4.2.5","tslib":"^2.4.0","wonka":"^6.0.0","graphql":"^16.0.0","@urql/core":"^5.0.0","typescript":"^4.7.4","graphql-tag":"^2.12.6"},"peerDependencies":{"wonka":"^4.0.14 || ^6.0.0","graphql":"^15.3.0 || ^16.0.0","@urql/core":"^1.12.3 || ^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/urql-custom-scalars-exchange_1.1.1_1732270749837_0.25934696591744233","host":"s3://npm-registry-packages"}},"1.2.0":{"version":"1.2.0","license":"MIT","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=16.0.0"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build --transpileOnly"},"peerDependencies":{"@urql/core":"^1.12.3 || ^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0","graphql":"^15.3.0 || ^16.0.0","wonka":"^4.0.14 || ^6.0.0"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"@atmina/urql-custom-scalars-exchange","author":{"name":"Christian Lentfort"},"module":"dist/urql-custom-scalars-exchange.esm.js","devDependencies":{"@urql/core":"^6.0.0","graphql":"^16.0.0","graphql-tag":"^2.12.6","husky":"^4.2.5","tsdx":"^0.14.1","tslib":"^2.4.0","typescript":"^4.7.4","wonka":"^6.0.0"},"packageManager":"yarn@4.4.0+sha512.91d93b445d9284e7ed52931369bc89a663414e5582d00eea45c67ddc459a2582919eece27c412d6ffd1bd0793ff35399381cb229326b961798ce4f4cc60ddfdb","_id":"@atmina/urql-custom-scalars-exchange@1.2.0","gitHead":"235cfe0a8eeddfa0a97fdb072fcb717146847c42","description":"urql exchange to allow mapping of custom scalar types","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-sz1NmZj6FN6MzgJpAjk69sxWF5F3KA5raLRhNtIcRJ4vgZmFExNgP4FxAK3kpXPn+NMJEO0BccWN6a8Cyi/z6g==","shasum":"12c03b69eb32688786b874e476626ec54fb4db9f","tarball":"https://registry.npmjs.org/@atmina/urql-custom-scalars-exchange/-/urql-custom-scalars-exchange-1.2.0.tgz","fileCount":16,"unpackedSize":109980,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIF7oWJbKdxdlR1iEiZz3Sud3j/iZ6hb3uAXW9JiaC4S6AiEA8qnYkijfdVL7ORPtzU/2tymB1XJdp3w0pCJvOUSvv5I="}]},"_npmUser":{"name":"atmina-owner","email":"accounts@atmina.de"},"directories":{},"maintainers":[{"name":"atmina-owner","email":"accounts@atmina.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/urql-custom-scalars-exchange_1.2.0_1756199949166_0.807383869467537"},"_hasShrinkwrap":false}},"time":{"created":"2024-09-18T13:05:00.430Z","modified":"2025-08-26T09:19:09.538Z","1.1.0":"2024-09-18T13:05:00.724Z","1.1.1":"2024-11-22T10:19:09.995Z","1.2.0":"2025-08-26T09:19:09.329Z"},"author":{"name":"Christian Lentfort"},"license":"MIT","description":"urql exchange to allow mapping of custom scalar types","maintainers":[{"name":"atmina-owner","email":"accounts@atmina.de"}],"readme":"# @atmina/urql-custom-scalars-exchange\n\nurql exchange to allow mapping of custom scalar types\n\n## Example\n\n```sh\nyarn add @atmina/urql-custom-scalars-exchange\n```\n\nor\n\n```\nnpm install --save @atmina/urql-custom-scalars-exchange\n```\n\nDefine a custom scalar like `Json` in your schema via:\n\n```gql\nscalar Json\n```\n\nDownload the introspection query from your endpoint. See the [urql docs](https://formidable.com/open-source/urql/docs/graphcache/schema-awareness/#getting-your-schema) for a script to download the schema from your endpoint.\n\nConfigure the exchange like so\n\n```js\nimport customScalarsExchange from '@atmina/urql-custom-scalars-exchange';\nimport schema from '../schema.json';\n\nconst scalarsExchange = customScalarsExchange({\n    schema: schema,\n    scalars: {\n        Json(value) {\n            return JSON.parse(value);\n        },\n    },\n});\n```\n\nFinally add the exchange to your urql client like so\n\n```js\nconst client = createClient({\n    url: 'http://localhost:1234/graphql',\n    exchanges: [dedupExchange, scalarsExchange, fetchExchange],\n});\n```\n\n## FAQ\n\n### Should this exchange be listed before or after the cache exchange?\n\nThis exchange should be listed before any cache exchange. Cache exchanges\nshould represent the the data as returned by the endpoint.\n\n## Local Development\n\nThis project uses [Corepack](https://nodejs.org/api/corepack.html). Run `corepack enable` to enable it if you haven't already.\n\nBelow is a list of commands you will probably find useful.\n\n### `npm start` or `yarn start`\n\nRuns the project in development/watch mode. Your project will be rebuilt upon\nchanges. TSDX has a special logger for you convenience. Error messages are\npretty printed and formatted for compatibility VS Code's Problems tab.\n\nYour library will be rebuilt if you make edits.\n\n### `npm run build` or `yarn build`\n\nBundles the package to the `dist` folder. The package is optimized and bundled\nwith Rollup into multiple formats (CommonJS, UMD, and ES Module).\n\n### `npm test` or `yarn test`\n\nRuns the test watcher (Jest) in an interactive mode. By default, runs tests\nrelated to files changed since the last commit.\n\n## Acknowledgements\n\nThis project was bootstrapped with [TSDX](https://github.com/jaredpalmer/tsdx).\n\nThis project is a fork of [Christian Lentfort's exchange](https://github.com/clentfort/urql-custom-scalars-exchange).\n","readmeFilename":"README.md"}