{"componentChunkName":"component---node-modules-nehalist-gatsby-theme-nehalem-src-templates-post-tsx","path":"/going-code-first-with-typegraphql","result":{"data":{"post":{"id":"ed1cb76d-3db6-53e6-adc4-ff5bed1bdcd6","headings":[{"depth":2},{"depth":2},{"depth":2},{"depth":3},{"depth":3},{"depth":3},{"depth":2}],"frontmatter":{"title":"Going Code First: Sharing Types with TypeGraphQL","path":"/going-code-first-with-typegraphql","tags":["GraphQL","Typescript"],"excerpt":"How using a code first GraphQL approach will save you from maintaining separate GraphQL & TypeScript types. First part of the Going Code First series which dives deep into the power of GraphQL.","created":"2021-08-16T00:00:00.000Z","createdPretty":"16 August, 2021","updated":"2021-08-16T00:00:00.000Z","updatedPretty":"16 August, 2021","featuredImage":{"childImageSharp":{"sizes":{"base64":"data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAANABQDASIAAhEBAxEB/8QAFwAAAwEAAAAAAAAAAAAAAAAAAAMEAv/EABQBAQAAAAAAAAAAAAAAAAAAAAP/2gAMAwEAAhADEAAAAbGr2K3gMX//xAAZEAACAwEAAAAAAAAAAAAAAAAAAQMEERL/2gAIAQEAAQUCuJ5D04S2ystgP//EABYRAAMAAAAAAAAAAAAAAAAAAAEQM//aAAgBAwEBPwEzX//EABYRAAMAAAAAAAAAAAAAAAAAAAEQM//aAAgBAgEBPwEUX//EABoQAAEFAQAAAAAAAAAAAAAAAAEAAhARIVH/2gAIAQEABj8CbSF5DR1CP//EABoQAAIDAQEAAAAAAAAAAAAAAAERABAhMXH/2gAIAQEAAT8hNTJTc7YWjDXls52mM1//2gAMAwEAAgADAAAAEKvP/8QAGBEAAgMAAAAAAAAAAAAAAAAAARAhUfD/2gAIAQMBAT8QCGtf/8QAFhEBAQEAAAAAAAAAAAAAAAAAEQEQ/9oACAECAQE/EGrn/8QAHBABAAICAwEAAAAAAAAAAAAAAQARITEQYYGh/9oACAEBAAE/EGxxKjWMRmBqiA7wwKA3HH2DYVj7KOopV1fH/9k=","aspectRatio":1.6,"src":"/static/e8ca36083c2d703b73b69f825d3da6e7/f2cbb/cover.jpg","srcSet":"/static/e8ca36083c2d703b73b69f825d3da6e7/8850c/cover.jpg 200w,\n/static/e8ca36083c2d703b73b69f825d3da6e7/da113/cover.jpg 400w,\n/static/e8ca36083c2d703b73b69f825d3da6e7/f2cbb/cover.jpg 800w,\n/static/e8ca36083c2d703b73b69f825d3da6e7/c26c2/cover.jpg 1200w,\n/static/e8ca36083c2d703b73b69f825d3da6e7/9352a/cover.jpg 1600w,\n/static/e8ca36083c2d703b73b69f825d3da6e7/135b2/cover.jpg 1919w","sizes":"(max-width: 800px) 100vw, 800px"}}}},"html":"<h2 id=\"introduction\" style=\"position:relative;\"><a href=\"#introduction\" aria-label=\"introduction permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Introduction</h2>\n<p>The biggest pain point of adopting GraphQL for any team (big or small) is creating your initial schema and maintaining it afterwards, period, end of story. Lets just face it, every GraphQL enthusiast has faced the same problem when explaining how amazing GraphQL is to their team for the first time and having it go like this:</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 500px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/fdd681c625fb1a88beae6ff2caccd7aa/41099/gql-intro-meme.jpg\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 136%; position: relative; bottom: 0; left: 0; background-image: url('data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAbABQDASIAAhEBAxEB/8QAGQABAAMBAQAAAAAAAAAAAAAAAAIDBAEF/8QAFgEBAQEAAAAAAAAAAAAAAAAAAQAC/9oADAMBAAIQAxAAAAH06pV4N41ZIbuCWG//xAAbEAACAgMBAAAAAAAAAAAAAAABAgASAxEyIv/aAAgBAQABBQJ3rLkzGdq59AqTj5frcx80UyiwDQ//xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAEDAQE/AR//xAAXEQEBAQEAAAAAAAAAAAAAAAABABAh/9oACAECAQE/AexJn//EABkQAAMBAQEAAAAAAAAAAAAAAAABMRARIf/aAAgBAQAGPwJlxo5zIRZCHh//xAAcEAEBAQEAAgMAAAAAAAAAAAABEQAhMVEQYbH/2gAIAQEAAT8hkSsPWRiTT3kFe6bClzsjn1v01Wylx3wHX5+bnoafjlAQ3//aAAwDAQACAAMAAAAQ+DGy/8QAFhEBAQEAAAAAAAAAAAAAAAAAAQAQ/9oACAEDAQE/EEic/8QAGBEBAQEBAQAAAAAAAAAAAAAAAQARMSH/2gAIAQIBAT8QUS02R4xz2//EAB0QAAMBAQACAwAAAAAAAAAAAAABESExUXFhgZH/2gAIAQEAAT8QjVY1rfgme0W0MZrynaQB2b7GTE39aQspJVwlU33Fvmep2oZsUqWDVrseusfKJ7Z20OH/2Q=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Explaining GraphQL Meme\"\n        title=\"Explaining GraphQL Meme\"\n        src=\"/static/fdd681c625fb1a88beae6ff2caccd7aa/41099/gql-intro-meme.jpg\"\n        srcset=\"/static/fdd681c625fb1a88beae6ff2caccd7aa/f93b5/gql-intro-meme.jpg 300w,\n/static/fdd681c625fb1a88beae6ff2caccd7aa/41099/gql-intro-meme.jpg 500w\"\n        sizes=\"(max-width: 500px) 100vw, 500px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n  </a>\n    </span></p>\n<h2 id=\"code-first-vs-schema-first\" style=\"position:relative;\"><a href=\"#code-first-vs-schema-first\" aria-label=\"code first vs schema first permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Code First vs Schema First</h2>\n<p>The biggest difference between a RESTful API &#x26; GraphQL is that GQL requires a Schema to work, much like a SQL database. Just that fact alone can be cause GraphQL to appear fairly daunting to setup &#x26; maintain. And with a schema first approach I would agree, especially when you are looking to migrate a fairly developed project, its going to take days, if not longer, to create a schema that matches your current REST system, but if you are already using Typescript (which I hope you are 😉) you might have the thought 🤔</p>\n<p><strong>\"Can I use my Typescript types as my GQL Schema?\".</strong> </p>\n<p>Unfortunately, the answer is \"No\" or at least not directly (foreshadowing). There are methods for using codegen to generate Typescript types from a GQL Schema, but that still means you have to write &#x26; maintain the Schema first. However, there is another approach which is to write code to generate a schema for you programmatically.</p>\n<h2 id=\"a-better-way---code-first\" style=\"position:relative;\"><a href=\"#a-better-way---code-first\" aria-label=\"a better way   code first permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>A better way - Code First</h2>\n<p>Writing out a whole schema often feels like a waste of time, because you often already have Typescript types or entities/models in your codebase that look similar to your Schema. </p>\n<h3 id=\"example-schema\" style=\"position:relative;\"><a href=\"#example-schema\" aria-label=\"example schema permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Example Schema</h3>\n<p>Lets say your app is a todo app and you will need a final schema that looks like this:</p>\n<div class=\"gatsby-highlight\" data-language=\"graphql\"><pre class=\"language-graphql\"><code class=\"language-graphql\"><span class=\"token comment\">## src/schema/typedefs.gql</span>\n<span class=\"token keyword\">type</span> <span class=\"token class-name\">User</span> <span class=\"token punctuation\">{</span>\n    <span class=\"token attr-name\">email</span><span class=\"token punctuation\">:</span> String<span class=\"token operator\">!</span>\n    <span class=\"token attr-name\">todos</span><span class=\"token punctuation\">:</span> <span class=\"token punctuation\">[</span>Todo<span class=\"token operator\">!</span><span class=\"token punctuation\">]</span><span class=\"token operator\">!</span>\n<span class=\"token punctuation\">}</span>\n\n<span class=\"token keyword\">type</span> <span class=\"token class-name\">Todo</span> <span class=\"token punctuation\">{</span>\n    <span class=\"token attr-name\">text</span><span class=\"token punctuation\">:</span> String<span class=\"token operator\">!</span>\n    <span class=\"token attr-name\">isDone</span><span class=\"token punctuation\">:</span> Boolean<span class=\"token operator\">!</span>\n    <span class=\"token attr-name\">owner</span><span class=\"token punctuation\">:</span> User<span class=\"token operator\">!</span>\n<span class=\"token punctuation\">}</span></code></pre></div>\n<h3 id=\"entitymodels\" style=\"position:relative;\"><a href=\"#entitymodels\" aria-label=\"entitymodels permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Entity/Models</h3>\n<p>In Code first approach the goal is to generate the above example schema 👆 from the model/entity files you already probably have in your codebase that probably look like this:</p>\n<div class=\"gatsby-highlight\" data-language=\"typescript\"><pre class=\"language-typescript\"><code class=\"language-typescript\"><span class=\"token comment\">// src/entity/User.entity.ts</span>\n@<span class=\"token function\">Entity</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span>\n<span class=\"token keyword\">export</span> <span class=\"token keyword\">class</span> <span class=\"token class-name\">User</span> <span class=\"token punctuation\">{</span>\n    @<span class=\"token function\">Column</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span>\n    email<span class=\"token operator\">:</span> <span class=\"token builtin\">string</span>\n\n    @<span class=\"token function\">OneToMany</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span>\n    todos<span class=\"token operator\">:</span> Todo<span class=\"token punctuation\">[</span><span class=\"token punctuation\">]</span>\n<span class=\"token punctuation\">}</span>\n\n<span class=\"token comment\">// src/entity/Todo.entity.ts</span>\n@<span class=\"token function\">Entity</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span>\n<span class=\"token keyword\">export</span> <span class=\"token keyword\">class</span> <span class=\"token class-name\">Todo</span> <span class=\"token punctuation\">{</span>\n    @<span class=\"token function\">Column</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span>\n    text<span class=\"token operator\">:</span> <span class=\"token builtin\">string</span>\n\n    @<span class=\"token function\">Column</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span>\n    isDone<span class=\"token operator\">:</span> <span class=\"token builtin\">string</span>\n\n    @<span class=\"token function\">ManyToOne</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span>\n    owner<span class=\"token operator\">:</span> User\n<span class=\"token punctuation\">}</span></code></pre></div>\n<ul>\n<li>The <code class=\"language-text\">@Column()</code> decorator creates a column in the database table</li>\n<li>The <code class=\"language-text\">@ManyToOne()</code> &#x26; <code class=\"language-text\">@OneToMany()</code> decorators create relationships between the tables</li>\n</ul>\n<p><em>These decorators are based off of <a href=\"https://typeorm.io/#/\">TypeORM</a></em></p>\n<h3 id=\"solution-typegraphql-\" style=\"position:relative;\"><a href=\"#solution-typegraphql-\" aria-label=\"solution typegraphql  permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Solution: TypeGraphQL 🚀</h3>\n<p>For you to generate your schema from your model/entity files your going to need <a href=\"https://typegraphql.com\">TypeGraphQL</a>. TypeGraphQL has quite a few tools which are useful and worth looking into, but the main we are going to focus on is that it gives you access to a couple new decorators to add to your models that will allow you to generate your schema from your models 👀. To continue with our example above our new entity files are going to look like this:</p>\n<div class=\"gatsby-highlight\" data-language=\"typescript\"><pre class=\"language-typescript\"><code class=\"language-typescript\"><span class=\"token comment\">// src/entity/User.entity.ts</span>\n@<span class=\"token function\">Entity</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span>\n@<span class=\"token function\">ObjectType</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span>\n<span class=\"token keyword\">export</span> <span class=\"token keyword\">class</span> <span class=\"token class-name\">User</span> <span class=\"token punctuation\">{</span>\n    @<span class=\"token function\">Column</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span>\n    @<span class=\"token function\">Field</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span>\n    email<span class=\"token operator\">:</span> <span class=\"token builtin\">string</span>\n\n    @<span class=\"token function\">OneToMany</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span>\n    @<span class=\"token function\">Field</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span> <span class=\"token operator\">=></span> Todo<span class=\"token punctuation\">)</span>\n    todos<span class=\"token operator\">:</span> Todo<span class=\"token punctuation\">[</span><span class=\"token punctuation\">]</span>\n<span class=\"token punctuation\">}</span>\n\n<span class=\"token comment\">// src/entity/Todo.entity.ts</span>\n@<span class=\"token function\">Entity</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span>\n@<span class=\"token function\">ObjectType</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span>\n<span class=\"token keyword\">export</span> <span class=\"token keyword\">class</span> <span class=\"token class-name\">Todo</span> <span class=\"token punctuation\">{</span>\n    @<span class=\"token function\">Column</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span>\n    @<span class=\"token function\">Field</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span>\n    text<span class=\"token operator\">:</span> <span class=\"token builtin\">string</span>\n\n    @<span class=\"token function\">Column</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span>\n    @<span class=\"token function\">Field</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span>\n    isDone<span class=\"token operator\">:</span> <span class=\"token builtin\">string</span>\n\n    @<span class=\"token function\">ManyToOne</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span>\n    @<span class=\"token function\">Field</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span> <span class=\"token operator\">=></span> <span class=\"token punctuation\">[</span>User<span class=\"token punctuation\">]</span><span class=\"token punctuation\">)</span>\n    owner<span class=\"token operator\">:</span> User\n<span class=\"token punctuation\">}</span></code></pre></div>\n<p>As you can see we added <code class=\"language-text\">@Field()</code> &#x26; <code class=\"language-text\">@ObjectType()</code> decorators to our models, the <code class=\"language-text\">@ObjectType()</code> decorators tells TypeGraphQL that the class should be a <code class=\"language-text\">type</code> in your schema, and the <code class=\"language-text\">@Field</code> is for making properties of the class turn into properties of the type inside your GQL Schema. All and all adding a couple decorators was all it took to stop you and your team from maintaining separate Typescript &#x26; GraphQL types. However, the real power of TypeGraphQL is that now your GQL types are available in code at compile time, which leads to all sorts of cool codegen possibilities.</p>\n<h2 id=\"conclusion\" style=\"position:relative;\"><a href=\"#conclusion\" aria-label=\"conclusion permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Conclusion</h2>\n<p>This was a very brief intro into Code First GraphQL using <a href=\"https://typegraphql.com\">TypeGraphQL</a>, but its just the tip of the iceberg, and in future blog posts I'm going to dive deeper into how you can utilize this to generate not only your model Schema, but also your CRUD resolvers and their Schemas using TypeGraphQL. Until then, let me know what you think in the comments and also feel free to ask me any clarifying questions.</p>"},"primaryTag":{"name":"GraphQL","color":"#e535ab"}},"pageContext":{"postId":"ed1cb76d-3db6-53e6-adc4-ff5bed1bdcd6","primaryTag":"GraphQL"}},"staticQueryHashes":["1116962356","2041457101","2275848304","2775657032","545095672"]}