{"_id":"@alkindix/graphql-utils","name":"@alkindix/graphql-utils","dist-tags":{"latest":"1.5.1"},"versions":{"1.5.1":{"name":"@alkindix/graphql-utils","version":"1.5.1","description":"GraphQL utilities to make working with GraphQL queries and APIs simpler.","main":"dist/index.js","contributors":[{"name":"Dominik Berger","url":"https://doemuulive-56e78.web.app/"},{"name":"RaviAnand Mohabir","email":"moravrav@gmail.com","url":"https://ravianand.web.app"},{"name":"Mohammed Alkindi","email":"salkindi2009@gmail.com"}],"keywords":["typescript","graphql","graphql-utils","ast"],"homepage":"https://jenyus-org.github.io/graphql-utils/","scripts":{"build":"tsc","prepare":"npm run build","test":"mocha -r ts-node/register src/**/*.test.ts"},"repository":{"type":"git","url":"git+https://github.com/AlkindiX/graphql-utils.git"},"license":"MIT","private":false,"types":"dist/index.d.ts","dependencies":{"graphql":"^16.6.0"},"devDependencies":{"@types/chai":"^4.3.3","@types/mocha":"^9.1.1","chai":"^4.3.6","mocha":"^9.1.4","ts-node":"^10.9.1","typescript":"^4.7.4"},"gitHead":"1f514a4e4139ace796798d01dfc5c7e14157c736","bugs":{"url":"https://github.com/AlkindiX/graphql-utils/issues"},"_id":"@alkindix/graphql-utils@1.5.1","_nodeVersion":"16.15.1","_npmVersion":"8.11.0","dist":{"integrity":"sha512-G5od4si8RbI7MbUEtRp78YAYOwBlnMpW6gmKwYWEuSquMYf7Jd4DA3u4zo7UeJ20+9WbDiOYv3VfU3Y+I7kjOA==","shasum":"9c4fa2ae961e64c65c9ccf8e7a97b7658b6c8e7e","tarball":"https://registry.npmjs.org/@alkindix/graphql-utils/-/graphql-utils-1.5.1.tgz","fileCount":101,"unpackedSize":743697,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHjjChbUBYrQj+YTGv/BP2988YE0/MWrD0mRySDTwBPnAiEA3muQC5n95yxPFyRX69iCX01mEpkyEjdb0UIVGPYgmP0="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi/J/eACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpzDA//aYJ+9XdQuvBY2kyE17oC9juVHILStTTk2JwBGXRvfRgoHH3m\r\nwQQAOUYno6EdiXDlE8ZaOnrUUXGBzJz4eterbSLNgB2J77SdnH6h/2KfsWTb\r\nBEGrPAo60yJgmQxhRF6FMWg5JrLZ3yefxfkOM49nwzPmqjSCKjAds8FFYEfa\r\nmzRkiscD8GrfCYEQTFcgmbvqsaMFK99mJbub36+bAPS9qPMA1da9FZJkihxJ\r\nRqtP+6vxjJXegxQFvH6xwK5eu1Syx5a7TFDKBJY5H9Vp/YjcGUjWtnBo2tMN\r\nPl1Dxy236+Xp9736CSxJ29VVKLzkQRM/mOYqYQicO+eVdGQpBcYwFmCQQqTr\r\npdE7865Fu8nE5mGV9t8EJigcVcb7W+4l79ZAEdMOjVATGPAl2+fznQljKSIR\r\na/Y2EgWmgow+Ko2j1rbbCTxltj3BS2xVgBFaipmaM0sGB/5MZpBcsQDixLmn\r\nk+50PY60BETcpkdcrl1SICL0rlcGq57kji2irg5FvI+MImujpBaFNraptq+J\r\nt4KqqBm9+RKoOOvkEBp3QWK9KNlnE5m8bZFyAX9r4wo+O2zYllY2DLzm1yzd\r\nRnRMhxabF+5FTNK+Psx3oVtYYUnlAsQqxhRbygp/qakcwQ2qvH9TtUJ2XiNG\r\n3imuZ6hDA2KxCnK8USm4LL7izoinr6eJ4UY=\r\n=NcJ0\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"alkindix","email":"salkindi2009@gmail.com"},"directories":{},"maintainers":[{"name":"alkindix","email":"salkindi2009@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-utils_1.5.1_1660723166148_0.9754705641615888"},"_hasShrinkwrap":false}},"time":{"created":"2022-08-17T07:59:26.071Z","1.5.1":"2022-08-17T07:59:26.438Z","modified":"2022-08-17T07:59:26.556Z"},"maintainers":[{"name":"alkindix","email":"salkindi2009@gmail.com"}],"description":"GraphQL utilities to make working with GraphQL queries and APIs simpler.","homepage":"https://jenyus-org.github.io/graphql-utils/","keywords":["typescript","graphql","graphql-utils","ast"],"repository":{"type":"git","url":"git+https://github.com/AlkindiX/graphql-utils.git"},"contributors":[{"name":"Dominik Berger","url":"https://doemuulive-56e78.web.app/"},{"name":"RaviAnand Mohabir","email":"moravrav@gmail.com","url":"https://ravianand.web.app"},{"name":"Mohammed Alkindi","email":"salkindi2009@gmail.com"}],"bugs":{"url":"https://github.com/AlkindiX/graphql-utils/issues"},"license":"MIT","readme":"# graphql-utils\n![License: MIT](https://img.shields.io/github/license/Jenyus-Org/graphql-utils)\n[![NPM Release](https://img.shields.io/npm/v/@jenyus-org/graphql-utils)](https://www.npmjs.com/package/@jenyus-org/graphql-utils)\n[![NPM Downloads](https://img.shields.io/npm/dw/@jenyus-org/graphql-utils)](https://www.npmjs.com/package/@jenyus-org/graphql-utils)\n[![NPM Type Definitions](https://img.shields.io/npm/types/@jenyus-org/graphql-utils)](https://www.npmjs.com/package/@jenyus-org/graphql-utils)\n\n`@jenyus-org/graphql-utils` is a collection of utilities to aid in working with GraphQL projects that have the [`graphql`](https://github.com/graphql/graphql-js) library as a base.\n\n- [graphql-utils](#graphql-utils)\n  - [Documentation](#documentation)\n  - [Installation](#installation)\n  - [Getting Started](#getting-started)\n\n## Documentation\n\nThe full documentation with live code sandboxes can be found [here](https://jenyus-org.github.io/graphql-utils/).\n\n## Installation\n\n`@jenyus-org/graphql-utils` can be installed from NPM by running one of the following commands:\n\nNPM:\n\n```bash\nnpm i --save @jenyus-org/graphql-utils\n```\n\nYarn:\n\n```bash\nyarn add @jenyus-org/graphql-utils\n```\n\nThis will install `@jenyus-org/graphql-utils` and all its dependencies.\n\n## Getting Started\n\nOne of the most straightforward and common use-cases of GraphQL-Utils is checking if a query contains a certain path. We can do this using the `hasFields()` utility:\n\n```ts\nimport { hasFields } from \"@jenyus-org/graphql-utils\";\n\nconst resolvers = {\n  Query: {\n    posts(_, __, ___, info) {\n      const requestedAuthor = hasFields(info, \"posts.author\");\n      console.log(requestedAuthor);\n    },\n  },\n};\n```\n\nThis will output `true` for the following query:\n\n```graphql\n{\n  posts {\n    id\n    title\n    body\n    author {\n      id\n      username\n      firstName\n      lastName\n    }\n  }\n}\n```\n","readmeFilename":"README.md"}