{"id":15130266,"url":"https://github.com/octet-stream/parasprite","last_synced_at":"2025-09-28T19:31:30.054Z","repository":{"id":48019678,"uuid":"83662123","full_name":"octet-stream/parasprite","owner":"octet-stream","description":"Describe your GraphQL schema using chainable interface ⛓","archived":true,"fork":false,"pushed_at":"2021-08-10T23:07:32.000Z","size":559,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-16T04:28:42.813Z","etag":null,"topics":["babel","chainable-interface","chains","graphql","graphql-schema","javascript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/parasprite","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/octet-stream.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-02T09:51:22.000Z","updated_at":"2023-01-28T07:18:20.000Z","dependencies_parsed_at":"2022-08-12T16:50:33.406Z","dependency_job_id":null,"html_url":"https://github.com/octet-stream/parasprite","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/octet-stream/parasprite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octet-stream%2Fparasprite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octet-stream%2Fparasprite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octet-stream%2Fparasprite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octet-stream%2Fparasprite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/octet-stream","download_url":"https://codeload.github.com/octet-stream/parasprite/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octet-stream%2Fparasprite/sbom","scorecard":{"id":701672,"data":{"date":"2025-08-11","repo":{"name":"github.com/octet-stream/parasprite","commit":"1adf708eb4b423b46ad34ff02d116ca4d18e6730"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/26 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 4 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"57 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-6chw-6frg-f759","Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-mh2h-6j8q-x246","Warn: Project is vulnerable to: GHSA-5q88-cjfq-g2mh","Warn: Project is vulnerable to: GHSA-xp63-6vf5-xf3v","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-ff7x-qrg7-qggm","Warn: Project is vulnerable to: GHSA-3gx7-xhv7-5mx3","Warn: Project is vulnerable to: GHSA-8r6j-v8pm-fqw3","Warn: Project is vulnerable to: MAL-2023-462","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97","Warn: Project is vulnerable to: GHSA-765h-qjxv-5f44","Warn: Project is vulnerable to: GHSA-f2jv-r9rf-7988","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j","Warn: Project is vulnerable to: GHSA-pc5p-h8pf-mvwp","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-2pr6-76vf-7546","Warn: Project is vulnerable to: GHSA-8j8c-7jfh-h6hx","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-6c8f-qphg-qjgp","Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-h726-x36v-rx45","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-w7rc-rwvf-8q5r","Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g","Warn: Project is vulnerable to: GHSA-px4h-xg32-q955","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-4g88-fppr-53pp","Warn: Project is vulnerable to: GHSA-4jqc-8m5r-9rpr","Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9","Warn: Project is vulnerable to: GHSA-r628-mhmh-qjhw","Warn: Project is vulnerable to: GHSA-9r2w-394v-53qc","Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh","Warn: Project is vulnerable to: GHSA-qq89-hq3f-393p","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v","Warn: Project is vulnerable to: GHSA-38fc-wpqx-33j7","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T05:20:57.555Z","repository_id":48019678,"created_at":"2025-08-22T05:20:57.556Z","updated_at":"2025-08-22T05:20:57.556Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277422026,"owners_count":25815336,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-28T02:00:08.834Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["babel","chainable-interface","chains","graphql","graphql-schema","javascript"],"created_at":"2024-09-26T02:43:24.981Z","updated_at":"2025-09-28T19:31:29.774Z","avatar_url":"https://github.com/octet-stream.png","language":"JavaScript","readme":"# parasprite\n\nDescribe your GraphQL schema using chainable interface\n\n\u003c!-- [![Mentioned in Awesome GraphQL](https://awesome.re/mentioned-badge.svg)](https://github.com/chentsulin/awesome-graphql) --\u003e\n[![Build Status](https://travis-ci.org/octet-stream/parasprite.svg?branch=master)](https://travis-ci.org/octet-stream/parasprite)\n[![Code Coverage](https://codecov.io/github/octet-stream/parasprite/coverage.svg?branch=master)](https://codecov.io/github/octet-stream/parasprite?branch=master)\n[![dependencies Status](https://david-dm.org/octet-stream/parasprite/status.svg)](https://david-dm.org/octet-stream/parasprite)\n[![devDependencies Status](https://david-dm.org/octet-stream/parasprite/dev-status.svg)](https://david-dm.org/octet-stream/parasprite?type=dev)\n\nSee [API](#api) section for more information.\n\n## Requirements\n\n* Node.js \u003e= 8 \u003c 9 || \u003e= 10\n* GraphQL.js 0.11.x || 0.12.x || 0.13.x || 14.x (see [installation section](https://github.com/octet-stream/parasprite#installation))\n\n## Installation\n\nYou can install parasprite from NPM:\n\n```\nnpm install --save parasprite graphql\n```\n\nor YARN:\n\n```\nyarn add parasprite graphql\n```\n\n## API\n\nParasprite has classes that help you describe GraphQL schema with chains.\n\n**Note: You can invoke these classes without \"new\" keyword, just like a function**\n\n### `constructor Schema()`\n\nMain class that defines GraphQL schema.\n\n#### Instance methods\n\n##### `query(name[, description]) -\u003e {Type}`\n\n  - **{string}** name – Name for root Query type\n  - **{string}** [description = undefined] – Description for root Query type\n\nDefine Query with given name and description.\n\n##### `mutation(name[, description]) -\u003e {Type}`\n\n  - **{string}** name – Name for root Mutation type\n  - **{string}** [description = undefined] – Description for root Mutation type\n\nDefine Mutation with given name and description.\n\n##### `subscription(name[, description]) -\u003e {Type}`\n\n  - **{string}** name – Name for root Subscription type\n  - **{string}** [description = undefined] – Description for root Subscription type\n\nDefine Subscription with given name and description.\n\n##### `end() -\u003e {GraphQLSchema}`\n\nMake GraphQLSchema.\n\n### `constructor Type`\n\nThis class helps you describe GraphQLObjectType. there is 3 different syntaxes:\n\n#### `Type(options)`\n\n  - **{object}** options\n    + **{string}** name – Name for the type\n    + **{string}** [description = null]\n    + **{GrphQLInterfaceType | GrphQLInterfaceType[]}** [interfaces = null]\n    + **{GraphQLObjectType}** [extends = null]\n    + **{Function}** [isTypeOf = null]\n\n#### `Type(name[, options])`\n\n  - **{string}** name\n  - **{object}** options\n    + **{string}** [description = null]\n    + **{GrphQLInterfaceType | GrphQLInterfaceType[]}** [interfaces = null]\n    + **{GraphQLObjectType}** [extends = null]\n    + **{Function}** [isTypeOf = null]\n\n#### `Type(name[, description, options])`\n\n  - **{string}** name\n  - **{string}** [description = null]\n  - **{object}** options\n    + **{GrphQLInterfaceType | GrphQLInterfaceType[]}** [interfaces = null]\n    + **{GraphQLObjectType}** [extends = null]\n    + **{Function}** [isTypeOf = null]\n\n#### Instance methods\n\n##### `field(options) -\u003e {Type}`\n\nDefine one field on **GraphQLObjectType**. Returns current instance of **Type** class.\n\n  - **{object}** options – A field declaration options with the following properties:\n    + **{string}** name\n    + **{string | [object, boolean]}** type – Any valid GraphQL type, or a tuple with the type and **required** flag\n    + **{string}** [description = undefined]\n    + **{string}** [deprecationReason = undefined]\n    + **{boolean}** [required = false] – If set to `true`, the field type will be marked as non-null.\n\n##### `resolve(options) -\u003e {Resolve}`\n\nAdd a new **resolve** field with the handler.\n\n  - **{object}** options – A field declaration options with the following properties:\n    + **{string}** name\n    + **{string | [object, boolean]}** type – Any valid GraphQL type, or a tuple with the type and **required** flag\n    + **{string}** [description = undefined]\n    + **{string}** [deprecationReason = undefined]\n    + **{boolean}** [required = false] – If set to `true`, the field type will be marked as non-null.\n    + **{Function}** handler – a function that will be used as resover for this field\n\n##### `subscribe(options) -\u003e {Resolve}`\n\nAdd a new **subscribe** field with the handler.\n\n  - **{object}** options – A field declaration options with the following properties:\n    + **{string}** name\n    + **{string | [object, boolean]}** type – Any valid GraphQL type, or a tuple with the type and **required** flag\n    + **{string}** [description = undefined]\n    + **{string}** [deprecationReason = undefined]\n    + **{boolean}** [required = false] – If set to `true`, the field type will be marked as non-null.\n    + **{Function}** handler – a function that will be used as subscriber for this field\n\n##### `end() -\u003e {GraphQLObjectType}`\n\nMake a `GraphQLObjectType`.\n\n### `constructor Input(name[, description])`\n\n  - **{string}** name – Name for object type\n  - **{string}** description – Description for object type\n\n#### Instance methods\n\n##### `field(options) -\u003e {Input}`\n\n  - **{object}** options – A field declaration options with the following properties:\n    + **{string}** name\n    + **{string | [object, boolean]}** type – Any valid GraphQL type, or a tuple with the type and **required** flag\n    + **{string}** [description = undefined]\n    + **{boolean}** [required = false] – If set to `true`, the field type will be marked as non-null.\n    + **{any}** [defaultValue = undefined] – default value for this field (`undefined` means there is no default value)\n\n### `constructor Interface(name[, description], resolveType)`\n\nCreate a custum GraphQLInterfaceType using Parasprite chainable API\n\nSee [Type](https://github.com/octet-stream/parasprite#constructor-typename-description-interfaces-istypeof) section for more info about available methods.\n\n### `constructor Union`\n\nCreate a new GraphQLUnionType.\n\nThis constructor have to different APIs:\n\n#### `Union(name[, description], types[, astNode])`\n  - **{string}** name – Name of the new Unit type.\n  - **{string}** description – Type description\n  - **{GraphQLObjectType[]}** types – A list of types, that could be resolved by the Union.\n  - **{object}** astNode\n\n#### `Union(options)`\n\n  - **{object}** options:\n    + **{string}** name – Name of the new Unit type.\n    + **{string}** description – Type description\n    + **{GraphQLObjectType[]}** types – A list of types, that could be resolved by the Union.\n    + **{object}** astNode\n\n#### Instance methods\n\n##### `match(predicate[, ctx]) -\u003e {Union}`\n\nAdd a predicate function to the internal queue.\nThese predicate will be used to match returning values with one of given types.\n\n## Utils\n\n##### `toListType(value) -\u003e {GraphQLList}`\n\nCreate GraphQLList from given array or value\n\n##### `toRequired(value) -\u003e {GraphQLNonNull}`\n\nMark given value as non-null.\n\n##### `buildSchema(path[, options]) -\u003e {GraphQLSchema}`\n\nBuild a GraphQLSchema by reading the definitions from given directory.\n\n  - **{string}** path – An absolute or relative path to the directory with the schema definitions.\n  - **{object}** [options = {}] – Advanced parameters for that utility.\n    + **{object}** query – Options for a Query definitions:\n      - **{string}** [name = \"Query\"] – The name of Query type\n      - **{string}** [dir = \"query\"] – The subdirectory name from where definitions would be read.\n    + **{object}** mutation – Options for a Mutation definitions:\n      - **{string}** [name = \"Mutation\"] – The name of Mutation type\n      - **{string}** [dir = \"mutation\"] – The subdirectory name from where definitions would be read.\n    + **{object}** subscription – Options for a Subscription definitions:\n      - **{string}** [name = \"Subscription\"] – The name of Subscription type\n      - **{string}** [dir = \"subscription\"] – The subdirectory name from where definitions would be read.\n\n## Usage\n\n1. Basically, all you need is to describe GraphQLSchema\n   is a Schema class and GraphQL internal types:\n\nTake a look at simple example with a resolver that just greets a user:\n\n```js\nimport {GraphQLString as TString} from \"graphql\" // You also need graphql package\nimport Schema from \"parasprite\"\n\nconst greeter = (_, {name}) =\u003e `Hello, ${name}!`\n\nconst schema = Schema()\n  .query(\"Query\")\n    .resolve({\n      name: \"greeter\",\n      type: TString,\n      required: true,\n      handler: greeter\n    })\n      .arg(\"name\", TString, true)\n    .end()\n  .end()\n.end()\n```\n\nThis schema is equivalent to the following code in GraphQL schema language:\n\n```graphql\ntype Query {\n  greeter(name: String!): String!\n}\n\nschema {\n  query: Query\n}\n```\n\n2. More complex example with `Type` class usage:\n\n```js\nimport {GraphQLString as TString} from \"graphql\" // You also need graphql package\nimport Schema, {Type} from \"parasprite\"\nimport Project from \"model/Project\" // Whatever model you need\n\nconst Project = Type(\"Project\")\n  .field({\n    name: \"name\",\n    type: TString,\n    description: \"Project name\"\n  })\n  .field({\n    name: \"tagline\",\n    type: TString\n  })\n.end()\n\nconst schema = Schema()\n  .query(\"Query\")\n    .resolve({\n      name: \"project\",\n      type: Project,\n      description: \"Get the project by his name\",\n      handler: Project.findProjectByName\n    })\n      .arg({\n        name: \"name\",\n        type: TString\n      })\n    .end()\n  .end()\n.end()\n```\n\nEquivalent to:\n\n```graphql\ntype Project {\n  # Project name\n  name: String\n  tagline: String\n}\n\ntype Query {\n  # Get the project by his name\n  project(name: String): Project\n}\n\nschema {\n  query: Query\n}\n```\n\n3. You can also pass a GraphQLObject type to the Schema root fields:\n\n```js\nimport {GraphQLString as TString} from \"graphql\"\n\nimport Schema from \"parasprite/Schema\"\nimport Type from \"parasprite/Type\"\n\nconst greeter = (_, {name}) =\u003e `Hello, ${name}!`\n\nconst TQuery = Type(\"Query\")\n  .resolve({\n    name: \"greet\",\n    type: TString,\n    required: true,\n    handler: greeter\n  })\n    .arg({\n      name: \"name\",\n      type: TString\n    })\n.end()\n\nconst schema = Schema().query(TQuery).end() // That's all!\n```\n\n4. Parasprite allow to extend GraphQLObjectType by using an **extends** option in **Type** constructor:\n\n```js\nimport {GraphQLString as TString, GraphQLInt as TInt} from \"graphql\"\n\nimport Type from \"parasprite/Type\"\n\nconst TUser = Type(\"User\")\n  .field({\n    name: \"login\",\n    type: TString,\n    required: true\n  })\n  .field({\n    name: \"age\",\n    type: TInt,\n    required: true\n  })\n.end()\n\nconst TViewer = Type(\"Viewer\", {extends: TUser})\n  .field({\n    name: \"email\",\n    type: TString,\n    required: true,\n    description: \"Private email address.\"\n  })\n.end()\n```\n\nOn GraphQL language:\n\n```graphql\ntype User {\n  login: String!\n  age: Int!\n}\n\ntype Viewer {\n  login: String!\n  age: Int!\n\n  # Private email address.\n  email: String!\n}\n```\n\n## Roadmap:\n\n  - [x] ~~Basic API with queries, mutations and object type~~;\n  - [x] ~~Object type~~;\n  - [x] ~~Input type~~;\n  - [x] ~~Tests~~;\n  - [x] ~~Interfaces~~ (documentation in progress);\n  - [x] ~~Extending for Type~~;\n  - [x] ~~Union type~~;\n  - [ ] Documentation (still in progress);\n  - [ ] Complex working examples (as external repo)\n\n## Misc\n\nWanted to learn more about GraphQL or try another tools?\nThen visit [awesome-graphql](https://github.com/chentsulin/awesome-graphql) list! :)\n","funding_links":[],"categories":["Libraries"],"sub_categories":["JavaScript Libraries"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foctet-stream%2Fparasprite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foctet-stream%2Fparasprite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foctet-stream%2Fparasprite/lists"}