{"id":13499166,"url":"https://github.com/rse/graphql-tools-sequelize","last_synced_at":"2025-04-19T09:59:02.664Z","repository":{"id":56666704,"uuid":"65852679","full_name":"rse/graphql-tools-sequelize","owner":"rse","description":"Integration of GraphQL-Tools and Sequelize ORM","archived":false,"fork":false,"pushed_at":"2023-09-21T18:00:41.000Z","size":227,"stargazers_count":90,"open_issues_count":2,"forks_count":6,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-06T00:43:00.940Z","etag":null,"topics":["graphql","graphql-tools","orm","sequelize","sql"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/graphql-tools-sequelize","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-08-16T20:49:40.000Z","updated_at":"2024-09-11T01:30:55.000Z","dependencies_parsed_at":"2024-01-15T00:53:44.357Z","dependency_job_id":"719acab5-218c-4316-8d61-1e4f15ee6a8c","html_url":"https://github.com/rse/graphql-tools-sequelize","commit_stats":null,"previous_names":[],"tags_count":67,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rse%2Fgraphql-tools-sequelize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rse%2Fgraphql-tools-sequelize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rse%2Fgraphql-tools-sequelize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rse%2Fgraphql-tools-sequelize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rse","download_url":"https://codeload.github.com/rse/graphql-tools-sequelize/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248662272,"owners_count":21141544,"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","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":["graphql","graphql-tools","orm","sequelize","sql"],"created_at":"2024-07-31T22:00:30.347Z","updated_at":"2025-04-19T09:59:02.644Z","avatar_url":"https://github.com/rse.png","language":"JavaScript","funding_links":[],"categories":["Libraries"],"sub_categories":["JavaScript Libraries"],"readme":"\nGraphQL-Tools-Sequelize\n========================\n\nIntegration of [GraphQL-Tools](https://github.com/apollostack/graphql-tools) and\n[Sequelize](http://sequelizejs.com) Object-Relational-Mapper (ORM).\n\n\u003cp/\u003e\n\u003cimg src=\"https://nodei.co/npm/graphql-tools-sequelize.png?downloads=true\u0026stars=true\" alt=\"\"/\u003e\n\n\u003cp/\u003e\n\u003cimg src=\"https://david-dm.org/rse/graphql-tools-sequelize.png\" alt=\"\"/\u003e\n\nAbout\n-----\n\nThis [Node.js](https://nodejs.org) module provides an integration of\nthe [GraphQL.js](https://github.com/graphql/graphql-js) wrapper\n[GraphQL-Tools](https://github.com/apollostack/graphql-tools) and the\n[Sequelize](http://sequelizejs.com) Object-Relational-Mapper (ORM) in order to operate on\nthe entities and their relationships of an underlying RDBMS through [GraphQL](http://graphql.org/).\nIt provides functions for GraphQL schema definition entries and their corresponding resolver functions\nfor querying and mutating entities and their relationships through GraphQL in a natural\nObject-Oriented (OO) way. It optionally provides Full-Text-Search (FTS) functionality\nthrough [ElasticLunr](http://elasticlunr.com/) and validation, authorization and tracing hooks.\nIt provides an elaborate CRUD (Create, Read, Update, Delete) functionality for the entities and\ntheir relationships.\n\nInstallation\n------------\n\n```shell\n$ npm install \\\n  graphql \\\n  graphql-tools \\\n  graphql-tools-types \\\n  graphql-tools-sequelize \\\n  sequelize \\\n  --save-dev\n```\n\nUsage\n-----\n\nSuppose we have a simple domain model, consisting of the two\nentities `OrgUnit` and `Person` and some relationships between them\n(in UML Class Diagram notation):\n\n```txt\n parentUnit                           supervisor\n +------+                             +------+\n |      |                             |      |\n |      V 0..1                   0..1 V      |\n |   +-----------+           +-----------+   |\n +---| OrgUnit   |  belongsTo| Person    |---+\n     |-----------|\u003c----------|-----------|\n     | id        |           | id        |\n     | initials  |---------\u003e*| initials  |\n     | name      |  members  | name      |\n     +-----------+           +-----------+\n               |                 ^\n               |     director    |\n               +-----------------+\n```\n\nWith Sequelize ORM this could be defined on the RDBMS level as:\n\n```js\nimport Sequelize from \"sequelize\"\n\nconst db = new Sequelize(...)\nconst dm = {}\n\ndm.OrgUnit = db.define(\"OrgUnit\", {\n    id:         { type: Sequelize.UUID,        primaryKey: true  },\n    initials:   { type: Sequelize.STRING(3),   allowNull:  false },\n    name:       { type: Sequelize.STRING(100), allowNull:  false }\n})\ndm.Person = db.define(\"Person\", {\n    id:         { type: Sequelize.UUID,        primaryKey: true  },\n    initials:   { type: Sequelize.STRING(3),   allowNull:  false },\n    name:       { type: Sequelize.STRING(100), allowNull:  false }\n})\ndm.OrgUnit.belongsTo(dm.OrgUnit, { as: \"parentUnit\", foreignKey: \"parentUnitId\" })\ndm.Person .belongsTo(dm.Person,  { as: \"supervisor\", foreignKey: \"personId\"     })\ndm.Person .belongsTo(dm.OrgUnit, { as: \"belongsTo\",  foreignKey: \"orgUnitId\"    })\ndm.OrgUnit.hasMany  (dm.Person,  { as: \"members\",    foreignKey: \"orgUnitId\"    })\ndm.OrgUnit.hasOne   (dm.Person,  { as: \"director\",   foreignKey: \"directorId\"   })\n```\n\nYou then establish a GraphQL-to-Sequelize mapping like this:\n\n```js\nimport GraphQLToolsSequelize from \"graphql-tools-sequelize\"\n\nconst gts = new GraphQLToolsSequelize(db)\nawait gts.boot()\n```\n\nNow you can use this mapping and its factory functions to conveniently\ncreate a GraphQL schema definition as the interface for operating on\nyour domain model:\n\n```js\nconst definition = `\n    schema {\n        query:    Root\n        mutation: Root\n    }\n    scalar UUID\n    scalar JSON\n    type Root {\n        ${gts.entityQuerySchema(\"Root\", \"\", \"OrgUnit\")}\n        ${gts.entityQuerySchema(\"Root\", \"\", \"OrgUnit*\")}\n        ${gts.entityQuerySchema(\"Root\", \"\", \"Person\")}\n        ${gts.entityQuerySchema(\"Root\", \"\", \"Person*\")}\n    }\n    type OrgUnit {\n        ${gts.attrIdSchema(\"OrgUnit\")}\n        ${gts.attrHcSchema(\"OrgUnit\")}\n        initials: String\n        name: String\n        director: Person\n        members: [Person]!\n        parentUnit: OrgUnit\n        ${gts.entityCloneSchema (\"OrgUnit\")}\n        ${gts.entityCreateSchema(\"OrgUnit\")}\n        ${gts.entityUpdateSchema(\"OrgUnit\")}\n        ${gts.entityDeleteSchema(\"OrgUnit\")}\n    }\n    type Person {\n        ${gts.attrIdSchema(\"Person\")}\n        ${gts.attrHcSchema(\"Person\")}\n        initials: String\n        name: String\n        belongsTo: OrgUnit\n        supervisor: Person\n        ${gts.entityCloneSchema (\"Person\")}\n        ${gts.entityCreateSchema(\"Person\")}\n        ${gts.entityUpdateSchema(\"Person\")}\n        ${gts.entityDeleteSchema(\"Person\")}\n    }\n`\n```\n\nYou also use it and its factory functions to define the corresponding\nGraphQL resolver functions:\n\n```js\nimport GraphQLToolsTypes from \"graphql-tools-types\"\n\nconst resolvers = {\n    UUID: GraphQLToolsTypes.UUID({ name: \"UUID\", storage: \"string\" }),\n    JSON: GraphQLToolsTypes.JSON({ name: \"JSON\" }),\n    Root: {\n        OrgUnit:    gts.entityQueryResolver (\"Root\", \"\", \"OrgUnit\"),\n        OrgUnits:   gts.entityQueryResolver (\"Root\", \"\", \"OrgUnit*\"),\n        Person:     gts.entityQueryResolver (\"Root\", \"\", \"Person\"),\n        Persons:    gts.entityQueryResolver (\"Root\", \"\", \"Person*\"),\n    },\n    OrgUnit: {\n        id:         gts.attrIdResolver      (\"OrgUnit\"),\n        hc:         gts.attrHcResolver      (\"OrgUnit\"),\n        director:   gts.entityQueryResolver (\"OrgUnit\", \"director\",   \"Person\"),\n        members:    gts.entityQueryResolver (\"OrgUnit\", \"members\",    \"Person*\"),\n        parentUnit: gts.entityQueryResolver (\"OrgUnit\", \"parentUnit\", \"OrgUnit\"),\n        clone:      gts.entityCloneResolver (\"OrgUnit\"),\n        create:     gts.entityCreateResolver(\"OrgUnit\"),\n        update:     gts.entityUpdateResolver(\"OrgUnit\"),\n        delete:     gts.entityDeleteResolver(\"OrgUnit\")\n    },\n    Person: {\n        id:         gts.attrIdResolver      (\"Person\"),\n        hc:         gts.attrHcResolver      (\"Person\"),\n        belongsTo:  gts.entityQueryResolver (\"Person\", \"belongsTo\",  \"OrgUnit\"),\n        supervisor: gts.entityQueryResolver (\"Person\", \"supervisor\", \"Person\"),\n        clone:      gts.entityCloneResolver (\"Person\"),\n        create:     gts.entityCreateResolver(\"Person\"),\n        update:     gts.entityUpdateResolver(\"Person\"),\n        delete:     gts.entityDeleteResolver(\"Person\")\n    }\n}\n```\n\nThen you use the established schema definition and resolver functions to\ngenerate an executable GraphQL schema with the help of GraphQL-Tools:\n\n```js\nimport * as GraphQLTools from \"graphql-tools\"\n\nconst schema = GraphQLTools.makeExecutableSchema({\n    typeDefs: [ definition ],\n    resolvers: resolvers\n})\n```\n\nFinally, you now can execute GraphQL queries against your RDBMS:\n\n```js\nconst query = `query { OrgUnits { name } }`\nconst variables = {}\n\nGraphQL.graphql(schema, query, null, null, variables).then((result) =\u003e {\n    console.log(\"OK\", util.inspect(result, { depth: null, colors: true }))\n}).catch((result) =\u003e {\n    console.log(\"ERROR\", result)\n})\n```\n\nThe following GraphQL mutation is a more elaborate example of how\nCRUD operations look like and what is possible:\n\n```txt\nmutation {\n    m1: Person {\n        c1: create(id: \"c9965340-a6c8-11e6-ac95-080027e303e4\", with: {\n            initials:   \"BB\",\n            name:       \"Big Boss\"\n        }) { id }\n        c2: create(id: \"ca1ace2c-a6c8-11e6-8ef0-080027e303e4\", with: {\n            initials:   \"JD\",\n            name:       \"John Doe\",\n            supervisor: \"c9965340-a6c8-11e6-ac95-080027e303e4\"\n        }) { id }\n    }\n    m2: OrgUnit {\n        c1: create(id: \"ca8c588a-a6c8-11e6-8f19-080027e303e4\", with: {\n            initials: \"EH\",\n            name:     \"Example Holding\",\n            director: \"c9965340-a6c8-11e6-ac95-080027e303e4\"\n        }) { id }\n        c2: create(id: \"cabaa4ce-a6c8-11e6-9d6d-080027e303e4\", with: {\n            initials:   \"EC\",\n            name:       \"Example Corporation\",\n            parentUnit: \"ca8c588a-a6c8-11e6-8f19-080027e303e4\",\n            director:   \"ca1ace2c-a6c8-11e6-8ef0-080027e303e4\",\n            members: { set: [\n                \"c9965340-a6c8-11e6-ac95-080027e303e4\",\n                \"ca1ace2c-a6c8-11e6-8ef0-080027e303e4\"\n            ] }\n        }) { id }\n    }\n    q1: OrgUnits(where: {\n        initials: \"EC\"\n    }) {\n        name\n        director   { initials name }\n        members    { initials name }\n        parentUnit {\n            name\n            director   { initials name }\n            members    { initials name }\n        }\n    }\n    m3: Person(id: \"c9965340-a6c8-11e6-ac95-080027e303e4\") {\n        update(with: { initials: \"XXX\" }) {\n            id initials name\n        }\n    }\n    c1: Person(id: \"c9965340-a6c8-11e6-ac95-080027e303e4\") {\n        clone {\n            id initials name\n        }\n    }\n    m4: Person(id: \"c9965340-a6c8-11e6-ac95-080027e303e4\") {\n        delete\n    }\n    q2: Persons {\n        id initials name\n    }\n}\n```\n\nFor more details, see the [all-in-one sample](./sample/), which even\nprovides a network interface through [HAPI](http://hapijs.com/) and the\n[GraphiQL](https://github.com/graphql/graphiql) web interface on top of it\n(with the help of its HAPI integration [HAPI-Plugin-GraphiQL](https://github.com/rse/hapi-plugin-graphiql)).\n\nApplication Programming Interface (API)\n---------------------------------------\n\n- `import GraphQLToolsSequelize from \"graphql-tools-sequelize\"`\u003cbr/\u003e\n  `gts = new GraphQLToolsSequelize(sequelize: Sequelize, options?: Object)`\u003cbr/\u003e\n\n  Creates a new GraphQL-Tools-Sequelize instance with an existing Sequelize instance `sequelize`.\n  The `options` have to given, but can be an empty object. It can contain the following\n  fields:\n\n    - `validator(type: String, obj: Object, ctx: Object): Promise\u003cBoolean\u003e`:\u003cbr/\u003e\n      Optionally validate entity object `obj` (of entity type `type`)\n      just before create or update operations. If the resulting\n      Promise is rejected, the create or update operation fails.\n      The `ctx` object is just passed through from the `GraphQL.graphql()` call.\n\n    - `authorizer(moment: String, op: String, type: String, obj: Object, ctx: Object): Promise\u003cBoolean\u003e`:\u003cbr/\u003e\n      Optionally authorize entity object `obj` (of entity type `type`)\n      for operation `op` (`create`, `read`, `update` or `delete`) at `moment` (`before` or `after`).\n\t  Notice that for `read` there is no `before` and for `delete` there is no `after`, of course. The `ctx` object is just passed through from\n      the `GraphQL.graphql()` call. If the resulting Promise is rejected\n      or returns `false`, the operation fails.\n\n    - `tracer(record: Object, ctx: Object): Promise\u003cany\u003e`:\u003cbr/\u003e\n      Optionally trace the operation via the action `record`. The fields of `record` are:\n      `{ op: String, arity: String, dstType: String, dstIds: String[], dstAttrs: String[] }`.\n      The `ctx` object is just passed through from the `GraphQL.graphql()` call.\n\n    - `fts: { [String]: String[] }`:\u003cbr/\u003e\n      Enables the Full-Text-Search (FTS) mechanism for all configured entity types\n      and their listed attributes.\n\n    - `idname: String = \"id\"`:\u003cbr/\u003e\n      Configures the GraphQL name of the mandatory unique identifier attribute on each entity.\n      The default name is `id`.\n\n    - `idtype: String = \"UUID\"`:\u003cbr/\u003e\n      Configures the GraphQL type of the mandatory unique identifier attribute on each entity.\n      The default type `UUID` assumes that you define the GraphQL scalar type `UUID` with the help of\n      [GraphQL-Tools-Types](https://github.com/rse/graphql-tools-types).\n\n    - `idmake: Function = () =\u003e (new UUID(1)).format()`:\u003cbr/\u003e\n      Configures a function for generating unique identifiers for the mandatory unique identifier attribute on each entity.\n      The default uses [pure-uuid](https://github.com/rse/pure-uuid) to generate UUIDs of version 1.\n\n    - `hcname: String = \"hc\"`:\u003cbr/\u003e\n      Configures the GraphQL name of the optional hash-code attribute on each entity.\n      The default name is `hc`. This attribute is NOT persisted and instead calculated on\n      the fly and is intended to be used for optimistic locking purposes.\n\n    - `hctype: String = \"UUID\"`:\u003cbr/\u003e\n      Configures the GraphQL type of the optional hash-code attribute on each entity.\n      The default type `UUID` assumes that you define the GraphQL scalar type `UUID` with the help of\n      [GraphQL-Tools-Types](https://github.com/rse/graphql-tools-types).\n\n    - `hcmake: Function = (data) =\u003e (new UUID(5, \"ns:URL\", \\`uri:gts:${data}\\`)).format()`:\u003cbr/\u003e\n      Configures a function for generating hash-codes for the optional hash-code attribute on each entity.\n      The default uses [pure-uuid](https://github.com/rse/pure-uuid) to generate UUIDs of version 5.\n\n- `gts.boot(): Promise`:\u003cbr/\u003e\n\n  Bootstrap the GraphQL-Tools-Sequelize instance. It internally\n  mainly initialized the Full-Text-Search (FTS) mechanism.\n\n- `gts.attrIdSchema(source: String): String`,\u003cbr/\u003e\n  `gts.attrIdResolver(source: String): Function`:\u003cbr/\u003e\n\n  Generate a GraphQL schema entry and a corresponding GraphQL resolver\n  function for querying the mandatory unique identifier attribute\n  of an entity of type `source`. By default this generates a schema\n  entry `\u003cidname\u003e: \u003cidtype\u003e` and a resolver which just returns\n  `\u003cobject\u003e[\u003cidname\u003e]`. This mandatory unique identifier attribute has\n  to be persisted and hence part of the Sequelize schema definition.\n\n- `gts.attrHcSchema(source: String): String`,\u003cbr/\u003e\n  `gts.attrHcResolver(source: String): Function`:\u003cbr/\u003e\n\n  Generate a GraphQL schema entry and a corresponding GraphQL resolver\n  function for querying the optional hash-code attribute of an\n  entity of type `source`. By default this generates a schema entry\n  `\u003chcname\u003e: \u003chctype\u003e` and a resolver which returns something like\n  `\u003chcmake\u003e(data(\u003cobject\u003e))`, where `data()` is an internal function\n  which deterministically concatenates the values of all attributes of\n  `\u003cobject\u003e`. This optional hash-code attribute has NOT to be persisted\n  and hence SHOULD NOT BE part of the Sequelize schema definition.\n\n- `gts.entityQuerySchema(source: String, relation: String, target: String): String`,\u003cbr/\u003e\n  `gts.entityQueryResolver(source: String, relation: String, target: String): Function`:\u003cbr/\u003e\n\n  Generate a GraphQL schema entry and a corresponding GraphQL resolver\n  function for querying one, many or all entities of particular entity\n  type `target` when coming from entity type `source` -- either\n  directly (in case `relation` is the empty string) or via relationship\n  `relation`. The `target` is either just the name `foo` of an entity\n  type `foo` (for relationship of cardinality 0..1) or `foo*` (for\n  relationship of cardinality 0..N). Based on the combination of\n  `relation` and the cardinality of `target`, four distinct GraphQL schema\n  entries (and corresponding GraphQL resolver functions) are generated:\n\n    - empty `relation` and `target` cardinality 0..1:\u003cbr/\u003e\n\n        ```js\n        `# Query one [${target}]() entity by its unique identifier (\\`id\\`) or condition (\\`where\\`) or` +\n        `# open an anonymous context for the [${target}]() entity.\\n` +\n        `# The [${target}]() entity can be optionally filtered by a condition on some relationships (\\`include\\`).\\n` +\n        `${target}(id: ${idtype}, where: JSON, include: JSON): ${target}\\n`\n        ```\n\n    - empty `relation` and `target` cardinality 0..N:\u003cbr/\u003e\n\n        ```js\n        `# Query one or many [${target}]() entities,\\n` +\n        \"# by either an (optionally available) full-text-search (`query`)\\n\" +\n        \"# or an (always available) attribute-based condition (`where`),\\n\" +\n        \"# optionally filter them by a condition on some relationships (`include`),\\n\" +\n        \"# optionally sort them (`order`),\\n\" +\n        \"# optionally start the result set at the n-th entity (zero-based `offset`), and\\n\" +\n        \"# optionally reduce the result set to a maximum number of entities (`limit`).\\n\" +\n        `${target}s(fts: String, where: JSON, include: JSON, order: JSON, offset: Int = 0, limit: Int = 100): [${target}]!\\n`\n        ```\n\n    - non-empty `relation` and `target` cardinality 0..1:\u003cbr/\u003e\n\n        ```js\n        `# Query one [${target}]() entity by following the **${relation}** relation of [${source}]() entity.\\n` +\n        `# The [${target}]() entity can be optionally filtered by a condition (\\`where\\`).\\n` +\n        `# The [${target}]() entity can be optionally filtered by a condition on some relationships (\\`include\\`).\\n` +\n        `${relation}(where: JSON, include: JSON): ${target}\\n`\n        ```\n\n    - non-empty `relation` and `target` cardinality 0..N:\u003cbr/\u003e\n\n        ```js\n        `# Query one or many [${target}]() entities\\n` +\n        `# by following the **${relation}** relation of [${source}]() entity,\\n` +\n        \"# optionally filter them by a condition (`where`),\\n\" +\n        \"# optionally filter them by a condition on some relationships (`include`),\\n\" +\n        \"# optionally sort them (`order`),\\n\" +\n        \"# optionally start the result set at the n-th entity (zero-based `offset`), and\\n\" +\n        \"# optionally reduce the result set to a maximum number of entities (`limit`).\\n\" +\n        `${relation}(where: JSON, include: JSON, order: JSON, offset: Int = 0, limit: Int = 100): [${target}]!\\n`\n       ```\n\n  The comments are intentionally also generated, as they document\n  the entries in the GraphQL schema and are visible through\n  GraphQL schema introspection tools like GraphiQL.\n\n- `gts.entity{Create,Clone,Update,Delete}Schema(type: String): String`,\u003cbr/\u003e\n  `gts.entity{Create,Clone,Update,Delete}Resolver(type: String): Function`:\u003cbr/\u003e\n\n  Generate a GraphQL schema entry and a corresponding GraphQL resolver\n  function for mutating one, many or all entities of particular entity\n  type `type`. The following GraphQL schema\n  entries (and corresponding GraphQL resolver functions) are generated:\n\n    - For `entityCreate{Schema,Resolver}(type)`:\u003cbr/\u003e\n\n        ```js\n        `# Create new [${type}]() entity, optionally with specified attributes (\\`with\\`).\\n` +\n        `create(id: ${idtype}, with: JSON): ${type}!\\n`\n        ```\n\n    - For `entityClone{Schema,Resolver}(type)`:\u003cbr/\u003e\n\n        ```js\n        `# Clone one [${type}]() entity by cloning its attributes (but not its relationships).\\n` +\n        `clone: ${type}!\\n`\n        ```\n\n    - For `entityUpdate{Schema,Resolver}(type)`:\u003cbr/\u003e\n\n        ```js\n        `# Update one [${type}]() entity with specified attributes (\\`with\\`).\\n` +\n        `update(with: JSON!): ${type}!\\n`\n        ```\n\n    - For `entityDelete{Schema,Resolver}(type)`:\u003cbr/\u003e\n\n        ```js\n        `# Delete one [${type}]() entity.\\n` +\n        `delete: ${idtype}!\\n`\n        ```\n\n  The comments are intentionally also generated, as they document\n  the entries in the GraphQL schema and are visible through\n  GraphQL schema introspection tools like GraphiQL.\n\nAssumptions\n-----------\n\nIt is assumed that all your Sequelize entities have an attribute\n`id` (see also `idname` configuration option) which is the\n(technical) primary key of an entity. By default, the type of\nfield `id` is `UUID`, but this can be overridden (see `idtype`\nconfiguration option). In case of the type `UUID`, it is assumed\nthat you define the GraphQL scalar type `UUID` with the help of\n[GraphQL-Tools-Types](https://github.com/rse/graphql-tools-types).\n\nNotice: all entities are required to have the field `id` and the type\nof all `id` fields have to be the same. But this does not prevent you\nfrom having *additional* domain-specific primary keys per entity of an\narbitrary type, of course. GraphQL-Tools-Sequelize just uses the field\n`id` for its functionality.\n\nIn addition, the scalar type `JSON` always has to be defined with the help of\n[GraphQL-Tools-Types](https://github.com/rse/graphql-tools-types).\n\nLicense\n-------\n\nCopyright (c) 2016-2023 Dr. Ralf S. Engelschall (http://engelschall.com/)\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frse%2Fgraphql-tools-sequelize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frse%2Fgraphql-tools-sequelize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frse%2Fgraphql-tools-sequelize/lists"}