{"id":14976094,"url":"https://github.com/devorein/mongql","last_synced_at":"2025-10-06T22:05:02.818Z","repository":{"id":37101109,"uuid":"280126758","full_name":"Devorein/mongql","owner":"Devorein","description":"Generate graphql typedefs, resolvers, fragments and operations from mongoose schema in an instant","archived":false,"fork":false,"pushed_at":"2023-01-23T07:09:05.000Z","size":966,"stargazers_count":10,"open_issues_count":22,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-04T00:23:39.851Z","etag":null,"topics":["codegen","graphql-schema","mongoose-to-graphql","operation-generator","schema-generators"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/mongql","language":"TypeScript","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/Devorein.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":"2020-07-16T10:39:26.000Z","updated_at":"2024-11-23T15:47:41.000Z","dependencies_parsed_at":"2023-02-12T21:16:09.997Z","dependency_job_id":null,"html_url":"https://github.com/Devorein/mongql","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/Devorein/mongql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devorein%2Fmongql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devorein%2Fmongql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devorein%2Fmongql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devorein%2Fmongql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Devorein","download_url":"https://codeload.github.com/Devorein/mongql/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devorein%2Fmongql/sbom","scorecard":{"id":40066,"data":{"date":"2025-08-11","repo":{"name":"github.com/Devorein/mongql","commit":"c15f78e1f5c97606f507c9b351ba2fa491026f68"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/1 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":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/node.js.yml:1","Info: no jobLevel write permissions found"],"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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"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":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node.js.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/Devorein/mongql/node.js.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node.js.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/Devorein/mongql/node.js.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/node.js.yml:25","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 npmCommand dependencies pinned"],"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":"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":"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":"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 29 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":"42 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-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-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-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-vxvm-qww3-2fh7","Warn: Project is vulnerable to: GHSA-f825-f98c-gj3g","Warn: Project is vulnerable to: GHSA-h8hf-x3f4-xwgp","Warn: Project is vulnerable to: GHSA-9m93-w8w6-76hh","Warn: Project is vulnerable to: GHSA-m7xq-9374-9rvx","Warn: Project is vulnerable to: GHSA-vg7j-7cwx-8wgw","Warn: Project is vulnerable to: GHSA-p92x-r36w-9395","Warn: Project is vulnerable to: GHSA-45q2-34rf-mr94","Warn: Project is vulnerable to: GHSA-5fw9-fq32-wv5p","Warn: Project is vulnerable to: GHSA-px4h-xg32-q955","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-44c6-4v22-4mhx","Warn: Project is vulnerable to: GHSA-4x5v-gmq8-25ch","Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh"],"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-14T21:17:20.417Z","repository_id":37101109,"created_at":"2025-08-14T21:17:20.417Z","updated_at":"2025-08-14T21:17:20.417Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276064220,"owners_count":25578997,"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-20T02:00:10.207Z","response_time":63,"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":["codegen","graphql-schema","mongoose-to-graphql","operation-generator","schema-generators"],"created_at":"2024-09-24T13:53:17.606Z","updated_at":"2025-09-20T07:31:10.804Z","avatar_url":"https://github.com/Devorein.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n# Mongql\n\nA package to convert your mongoose schema to graphql schema\n\n## TOC\n\n- [Mongql](#mongql)\n  - [TOC](#toc)\n  - [Features](#features)\n  - [Motivation](#motivation)\n  - [Usage](#usage)\n    - [Without initial typedef and resolvers](#without-initial-typedef-and-resolvers)\n    - [With initial typedef and resolvers](#with-initial-typedef-and-resolvers)\n    - [Output SDL and AST](#output-sdl-and-ast)\n    - [Using Schema config typedefs and resolvers](#using-schema-config-typedefs-and-resolvers)\n    - [FieldSchema Configs](#fieldschema-configs)\n    - [Fine grain Mutation configuration](#fine-grain-mutation-configuration)\n    - [Fine grain Query configuration](#fine-grain-query-configuration)\n    - [Fine grain Type configuration](#fine-grain-type-configuration)\n    - [generating Models](#generating-models)\n    - [Using local folders](#using-local-folders)\n    - [Controlling nullability](#controlling-nullability)\n  - [Concept](#concept)\n    - [Generation of Query](#generation-of-query)\n    - [Generation of Mutation](#generation-of-mutation)\n    - [Generation of Types](#generation-of-types)\n    - [Generation of Fragments](#generation-of-fragments)\n    - [Generation of Operations](#generation-of-operations)\n  - [API](#api)\n  - [TODO](#todo)\n\n## Features\n\n1. Create graphql schema (typedef and resolvers) from mongoose schema\n2. Stitch already created typedef and resolvers\n3. Easily configurable (any of the typedef and resolvers can be turned off)\n4. Output the generated SDL\n5. Auto addition of graphql validators with mongoose\n6. Auto generation of fragments and operations\n7. Automatic integration with custom various scalar types from graphql-scalars\n8. Helper methods for dealing with graphql ast nodes\n9. Auto generation of fragments and operations\n10. Auto generation of basic crud operations\n\n## Motivation\n\n1. Creating a graphql SDL is not a difficult task, but things get really cumbersome after a while, especially since a lot of the typedefs and resolvers are being repeated.\n2. Automating the schema generation helps to avoid errors regarding forgetting to define something in the schema thats been added to the resolver or vice versa.\n3. Creating resolvers for subtypes in a PITA, especially if all of them just refers to the same named key in parent\n4. Generating fragments and operation manually is quite difficult and error prone, typing duplicate stuffs and figuring out the interrelationship between each fragment.\n\n## Usage\n\n### Without initial typedef and resolvers\n\n``` js\n// User.schema.js\nconst mongoose = require('mongoose');\n\nconst UserSchema = mongoose.Schema({\n  name: {\n    type: String,\n    mongql: {\n      nullable: {\n        object: [true]\n      } // field level config\n    }\n  }\n});\n\nUserSchema.mongql = {\n  resource: 'user'\n}; // schema level config\n\nmodule.exports = UserSchema;\n```\n\n``` js\n// index.js\nconst {\n  makeExecutableSchema\n} = require('@graphql-tools/schema');\nconst {\n  ApolloServer\n} = require('apollo-server-express');\nconst Mongql = require('MonGql');\n\nconst UserSchema = require('./User.schema.js');\n\n(async function() {\n  const mongql = new Mongql({\n    Schemas: [UserSchema], // Global level config\n  });\n\n  // Calling the generate method generates the typedefs and resolvers\n  const {\n    TransformedResolvers,\n    TransformedTypedefs, // Contains both arr and obj representation\n  } = await mongql.generate();\n\n  const GRAPHQL_SERVER = new ApolloServer({\n    schema: makeExecutableSchema({\n      typeDefs: TransformedTypedefs.arr,\n      resolvers: TransformedResolvers.arr,\n    }),\n    context: () =\u003e ({\n      user: req.user\n    })\n  });\n})();\n```\n\n### With initial typedef and resolvers\n\n``` js\n// user.typedef.js\nmodule.exports = gql `\n  type BasicUserType{\n    name:String!\n  }\n`;\n```\n\n``` js\n// user.resolver.js\nmodule.exports = {\n  Mutation: {\n    updateUserSettings: ...\n  }\n}\n```\n\n``` js\nconst UserAST = require('./user.typedef.js');\nconst UserResolver = require('./user.resolver.js');\n\nconst PreTransformedTypeDefsASTs = {\n  user: UserAST // This has to match with the resource name added in the mongoose schema\n}\n\nconst PreTransformedResolvers = {\n  user: UserResolver\n}\n\nconst mongql = new Mongql({\n  Schemas: [UserSchema, SettingsSchema],\n  Typedefs: {\n    init: PreTransformedTypeDefsASTs\n  },\n  Resolvers: {\n    init: PreTransformedResolvers\n  }\n});\n```\n\n### Output SDL and AST\n\n``` js\n  const mongql = new Mongql({\n    Schemas: [],\n    output: {\n      SDL: path.resolve(__dirname, \"./SDL\"),\n      AST: path.resolve(__dirname, \"./AST\")\n    }\n  });\n\n  await mongql.generate()\n```\n\n### Using Schema config typedefs and resolvers\n\n``` js\n  const UserSchema = new mongoose.model({\n    name: String\n  });\n  UserSchema.mongql = {\n    TypeDefs: `type userinfo{\n      name: String!\n    }`,\n    Resolvers: {\n      Query: {\n        getUserInfo() {}\n      }\n    }\n  }\n  const mongql = new Mongql({\n    Schemas: [UserSchema],\n  });\n\n  await mongql.generate()\n```\n\n### FieldSchema Configs\n\n``` js\n  const NestedSchema = new mongoose.model({\n    nested: Boolean\n  });\n\n  NestedSchema.mongql = {\n    // FieldSchema configs\n  }\n\n  const UserSchema = new mongoose.model({\n    name: String,\n    nested: NestedSchema\n  });\n\n  UserSchema.mongql = {\n    TypeDefs: `type userinfo{\n      name: String!\n    }`,\n    Resolvers: {\n      Query: {\n        getUserInfo() {}\n      }\n    }\n  }\n  const mongql = new Mongql({\n    Schemas: [UserSchema],\n  });\n\n  await mongql.generate()\n```\n\n### Fine grain Mutation configuration\n\n``` js\nconst mongql = new Mongql({\n  Schemas: [UserSchema, SettingsSchema],\n  generate: {\n    mutation: false, // will not generate any mutation typedef and resolver,\n    mutation: {\n      create: false, // Will not generate any create mutation typedef and resolver,\n      update: {\n        multi: false // Will not generate any update multi mutation typedef and resolver\n      },\n      single: false // Will not generate any single mutation typedef and resolver\n    }\n  }\n});\n```\n\n### Fine grain Query configuration\n\n``` js\nconst mongql = new Mongql({\n  Schemas: [UserSchema, SettingsSchema],\n  generate: {\n    query: false,\n    query: {\n      all: false\n    },\n    query: {\n      paginated: {\n        self: false\n      }\n    },\n    query: {\n      filtered: {\n        others: {\n          whole: false\n        }\n      }\n    },\n    query: {\n      self: false, // remove all self related typedefs and resolvers,\n      self: {\n        whole: false // remove all selfwhole related typedefs and resolvers,\n      },\n      count: false, // remove all count related typedefs and resolvers,\n    }\n  }\n});\n```\n\n### Fine grain Type configuration\n\n``` js\nconst mongql = new Mongql({\n  Schemas: [UserSchema, SettingsSchema],\n  generate: {\n    input: {\n      update: false\n    },\n    interface: false,\n    enum: false,\n    union: false,\n    object: {\n      self: false\n    }\n  }\n});\n```\n\n### generating Models\n\n``` js\nconst {\n  makeExecutableSchema\n} = require('@graphql-tools/schema');\nconst Mongql = require('mongql');\nconst {\n  ApolloServer\n} = require('apollo-server');\n\n(async function() {\n  const mongql = new Mongql({\n    Schemas: [\n      /* Your schema array here */\n    ],\n  });\n  const {\n    TransformedTypedefs,\n    TransformedResolvers\n  } = await mongql.generate();\n  const server = new ApolloServer({\n    schema: makeExecutableSchema({\n      typeDefs: TransformedTypedefs.arr,\n      resolvers: TransformedResolvers.arr,\n    }),\n    context: mongql.generateModels()\n  });\n  await server.listen();\n})();\n```\n\n### Using local folders\n\n``` js\nconst Mongql = require('mongql');\nconst {\n  ApolloServer\n} = require('apollo-server');\n\n(async function() {\n  const mongql = new Mongql({\n    Schemas: path.resolve(__dirname, './schemas'),\n    output: {\n      dir: __dirname + '\\\\SDL'\n    },\n    Typedefs: {\n      init: path.resolve(__dirname, './typedefs')\n    },\n    Resolvers: {\n      init: path.resolve(__dirname, './resolvers')\n    }\n  });\n  const server = new ApolloServer({\n    schema: makeExecutableSchema({\n      typeDefs: TransformedTypedefs.arr,\n      resolvers: TransformedResolvers.arr,\n    }),\n    context: mongql.generateModels()\n  });\n  await server.listen();\n})();\n```\n\n### Controlling nullability\n\n``` js\nconst UserSchema = new mongoose.model({\n  name: {\n    type: String,\n    mongql {\n      nullable: {\n        object: [true]\n      } // name: String\n    }\n  },\n  age: {\n    type: [Number],\n    mongql: {\n      nullable: {\n        input: [false, true]\n      } // age: [Int!]\n    }\n  }\n});\n```\n\nMongql contains 4 levels of configs\n\n1. **Constructor/global level config**: passed to the ctor during Mongql instantiation\n2. **Schema level config**: Attached to the schema via mongql key\n3. **Field level config**: Attached to the field via mongql key\n4. **FieldSchema level config**: Contains both field and schema configs\n\nPrecedence of same config option is global \u003c Schema \u003c FieldSchema \u003c field. That is for the same option the one with the highest precedence will be used.\n\n## Concept\n\nDuring the generation of schema, a few concepts are followed\n\n### Generation of Query\n\n1. Each Resource query object type contains four parts\n\n   1. Range(Input):\n\n      1. All: Gets all the resource\n      2. Paginated : Used to get resource through pagination inpu\n      3. Filtered : Used to get resource through filter input\n      4. ID: Used to get a resource by id\n\n   2. Auth:\n\n      1. Self: Used to indicate logged in users resource\n      2. Others: Used to indicate other users resource (when current user is authenticated)\n      3. Mixed: Used to incicate others users resource (when user is unauthenticated)\n\n   3. Resource: Name of the resource (capitalized \u0026 pluralized form)\n\n   4. Part(Output):\n\n       1. Whole: Get the whole data along with sub/extra types\n       2. Count: get the count of resource\n\nGenerated Query Examples: `getSelfSettingsWhole, getOthersSettingsCount` ; \n\n**NOTE**: Count part is not generate in paginated and id range as for paginated query the user already knows the count and id returns just one\n\n### Generation of Mutation\n\n1. Each resource mutation object type contains 2 parts\n\n   1. Action: One of create|update|delete\n   2. Target: resource for targeting single resource, resources for targeting multiple resources\n2. Specific named functions pre|post(action) attached to  the model's static is called pre and post of each action\n\nGenerated Mutation Examples: `createSetting, updateSettings`\n\n### Generation of Types\n\n1. Each resource types contains the following parts\n\n   1. For each schema (base and nested), based on the permitted auth, object will be created, and based on generate config interface, input and union will be created\n\n### Generation of Fragments\n\n1. Each object type gets converted into 3 differnet kinds of fragment\n   1. RefsNone: A fragment which excludes all the Refs Object type\n   2. ScalarsOnly: A fragment which includes its and all included object types scalar fields \n   3. ObjectsNone: A fragment which includes only scalar fields\n\n2. All the custom fragments are generated from all the schemas \n\n### Generation of Operations\n\n1. All the generated operations have various kinds based on the generated fragments of that schema\n\n## API\n\nAll of the methods and configs have been commented along with their types\n\n## TODO\n\n1. Add more well rounded tests\n2. Provide ES modules to make the library tree-shakabl\n\n**PRS are more than welcome and highly appreciated!!!!**\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevorein%2Fmongql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevorein%2Fmongql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevorein%2Fmongql/lists"}