{"id":309049,"date":"2020-08-26T15:00:57","date_gmt":"2020-08-26T15:00:57","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=309049"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=309049","title":{"rendered":"GraphQL + Typescript = \u043b\u044e\u0431\u043e\u0432\u044c. TypeGraphQL v1.0"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/516634\/\"><a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/516634\/\"><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/oq\/_i\/tr\/oq_itrrbev4abzbws_dkqyyyd_e.png\"><\/div>\n<p><\/a><\/p>\n<h1><font color=\"#3AC1EF\">\u0417TypeGraphQL v1.0<\/font><\/h1>\n<p>  19 \u0430\u0432\u0433\u0443\u0441\u0442\u0430 \u0432\u044b\u0448\u0435\u043b \u0432 \u0440\u0435\u043b\u0438\u0437 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a TypeGraphQL, \u0443\u043f\u0440\u043e\u0449\u0430\u044e\u0449\u0438\u0439 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 GraphQL \u043d\u0430 Typescript. \u0417\u0430 \u0434\u0432\u0430 \u0441 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u043e\u0439 \u0433\u043e\u0434\u0430 \u043f\u0440\u043e\u0435\u043a\u0442 \u043e\u0431\u0437\u0430\u0432\u0451\u043b\u0441\u044f \u0441\u043e\u043b\u0438\u0434\u043d\u044b\u043c \u043a\u043e\u043c\u044c\u044e\u043d\u0438\u0442\u0438 \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0439 \u0438 \u0443\u0432\u0435\u0440\u0435\u043d\u043e \u043d\u0430\u0431\u0438\u0440\u0430\u0435\u0442 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044c. \u0421\u043f\u0443\u0441\u0442\u044f \u0431\u043e\u043b\u0435\u0435 650 \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432 \u0443 \u043d\u0435\u0433\u043e \u0431\u043e\u043b\u0435\u0435 5000 \u0437\u0432\u0451\u0437\u0434 \u0438 400 \u0444\u043e\u0440\u043a\u043e\u0432 \u043d\u0430 \u0433\u0438\u0442\u0445\u0430\u0431\u0435, \u043f\u043b\u043e\u0434 \u0443\u043f\u043e\u0440\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043e\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u041c\u0438\u0445\u0430\u043b\u0430 \u041b\u0438\u0442\u0435\u043a\u0430. \u0412 \u0432\u0435\u0440\u0441\u0438\u0438 1.0 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u043b\u0443\u0447\u0448\u0438\u043b\u0430\u0441\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0441\u0445\u0435\u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0438\u0437\u043e\u043b\u044f\u0446\u0438\u044e \u0438 \u0438\u0437\u0431\u0430\u0432\u0438\u043b\u0438\u0441\u044c \u043e\u0442 \u043f\u0440\u0435\u0436\u043d\u0435\u0439 \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438, \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0434\u0432\u0435 \u043a\u0440\u0443\u043f\u043d\u044b\u0435 \u0444\u0438\u0447\u0438 \u2014 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b \u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f, \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0431\u044b\u043b \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d \u043a \u043f\u043e\u043b\u043d\u043e\u0439 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438 \u0441 GraphQL.<a name=\"habracut\"><\/a><\/p>\n<h2><font color=\"#3AC1EF\">\u0414\u043b\u044f \u0447\u0435\u0433\u043e \u044d\u0442\u043e\u0442 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a?<\/font><\/h2>\n<p>  \u041c\u0438\u0445\u0430\u043b, \u0441\u0441\u044b\u043b\u0430\u044f\u0441\u044c \u043d\u0430 \u0441\u0432\u043e\u0439 \u043e\u043f\u044b\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0433\u043e\u043b\u044b\u043c GraphQL, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u00ab\u0431\u043e\u043b\u0435\u0437\u043d\u0435\u043d\u043d\u044b\u043c\u00bb \u0438\u0437-\u0437\u0430 \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0438 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u043a\u043e\u0434\u0430:<\/p>\n<ol>\n<li>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0442\u0438\u043f\u044b GraphQL \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 <a href=\"https:\/\/www.prisma.io\/blog\/graphql-sdl-schema-definition-language-6755bcb9ce51\">SDL<\/a> (Schema Definition Language);<\/li>\n<li>\u0417\u0430\u0442\u0435\u043c \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Object-relational_mapping\">ORM<\/a> (Object-Relational Mapping), \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445;<\/li>\n<li>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u0434\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u043c\u0443\u0442\u0430\u0446\u0438\u0439 \u0438 \u043f\u043e\u043b\u0435\u0439, \u0447\u0442\u043e \u0432\u044b\u043d\u0443\u0436\u0434\u0430\u0435\u0442 \u043d\u0430\u0441&#8230;<\/li>\n<li>\u0421\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0442\u0430\u0439\u043f\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0438\u043d\u043f\u0443\u0442\u043e\u0432 \u0438 \u0434\u0430\u0436\u0435 \u0442\u0438\u043f\u043e\u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432.<\/li>\n<li>\u0422\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f, \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u044f \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0440\u0443\u0442\u0438\u043d\u043d\u044b\u0435 \u0432\u0435\u0449\u0438 \u0432\u0440\u043e\u0434\u0435 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438, \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439.<\/li>\n<\/ol>\n<p>  \u0417\u0432\u0443\u0447\u0438\u0442 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u043d\u043e, \u0438 \u043f\u0440\u0438 \u0442\u0430\u043a\u043e\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0435 \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u2014 \u0432 \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u0442\u0440\u0443\u0434\u043d\u044f\u0435\u0442 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044e \u0432\u0441\u0435\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043f\u0440\u0438 \u0435\u0433\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0440\u0438\u0441\u043a\u043e\u0432 \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u0445. \u0427\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u043e\u0435 \u043f\u043e\u043b\u0435 \u043a \u043d\u0430\u0448\u0435\u0439 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0435\u0440\u0435\u0431\u0440\u0430\u0442\u044c \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b: \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043a\u043b\u0430\u0441\u0441 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438, \u0437\u0430\u0442\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0447\u0430\u0441\u0442\u044c \u0441\u0445\u0435\u043c\u044b \u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441. \u0422\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0438 \u0441 \u0432\u0445\u043e\u0434\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0438\u043b\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438, \u043b\u0435\u0433\u043a\u043e \u0437\u0430\u0431\u044b\u0442\u044c \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u043e\u0434\u0438\u043d \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0438\u043b\u0438 \u043e\u0448\u0438\u0431\u0438\u0442\u044c\u0441\u044f \u0432 \u043e\u0434\u043d\u043e\u043c \u0442\u0438\u043f\u0435.<\/p>\n<p>  \u0414\u043b\u044f \u0431\u043e\u0440\u044c\u0431\u044b \u0441 \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u044e \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0441\u0435\u0433\u043e \u044d\u0442\u043e\u0433\u043e \u0440\u0443\u0447\u043d\u043e\u0433\u043e \u0442\u0440\u0443\u0434\u0430 \u0438 \u0431\u044b\u043b \u0441\u043e\u0437\u0434\u0430\u043d TypeGraphQL. \u0412 \u0435\u0433\u043e \u043e\u0441\u043d\u043e\u0432\u0435 \u043b\u0435\u0436\u0438\u0442 \u0438\u0434\u0435\u044f \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432\u0441\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044f \u0441\u0445\u0435\u043c\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0447\u0435\u0440\u0435\u0437 \u043a\u043b\u0430\u0441\u0441\u044b \u0438 \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u044b. \u0420\u0443\u0447\u043d\u043e\u0439 \u0442\u0440\u0443\u0434 \u043f\u043e \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439, \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0442\u0430\u043a\u0436\u0435 \u0431\u0435\u0440\u0451\u0442 \u043d\u0430 \u0441\u0435\u0431\u044f, \u0440\u0430\u0437\u0433\u0440\u0443\u0436\u0430\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430.<\/p>\n<h2><font color=\"#3AC1EF\">\u041f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b<\/font><\/h2>\n<p>  \u0420\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u0440\u0430\u0431\u043e\u0442\u0443 TypeGraphQL \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 GraphQL API \u0434\u043b\u044f \u0431\u0430\u0437\u044b \u0440\u0435\u0446\u0435\u043f\u0442\u043e\u0432.<\/p>\n<p>  \u0422\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u0445\u0435\u043c\u0430 \u0432 SDL:<\/p>\n<pre><code class=\"javascript\">    type Recipe {         id: ID!         title: String!         description: String         creationDate: Date!         ingredients: [String!]!     } <\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0435\u043f\u0438\u0448\u0435\u043c \u0435\u0451 \u0432 \u0432\u0438\u0434\u0435 \u043a\u043b\u0430\u0441\u0441\u0430 Recipe:<\/p>\n<pre><code class=\"javascript\">    class Recipe {         id: string;         title: string;         description?: string;         creationDate: Date;         ingredients: string[];     } <\/code><\/pre>\n<p>  \u0421\u043d\u0430\u0431\u0434\u0438\u043c \u043a\u043b\u0430\u0441\u0441 \u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u0430\u043c\u0438:<\/p>\n<pre><code class=\"javascript\">    @ObjectType()     class Recipe {         @Field(type =&gt; ID)         id: string;          @Field()         title: string;          @Field({ nullable: true })         description?: string;          @Field()         creationDate: Date;          @Field(type =&gt; [String])         ingredients: string[];     } <\/code><\/pre>\n<p>  \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u0435\u0439 \u0438 \u0442\u0438\u043f\u043e\u0432 \u0432 <a href=\"https:\/\/typegraphql.com\/docs\/types-and-fields.html\">\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a><\/p>\n<p>  \u0417\u0430\u0442\u0435\u043c \u043c\u044b \u043e\u043f\u0438\u0448\u0435\u043c \u043e\u0431\u044b\u0447\u043d\u044b\u0435 CRUD \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438 \u043c\u0443\u0442\u0430\u0446\u0438\u0438. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 RecipeResolver c RecipeService, \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u043c \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440:<\/p>\n<pre><code class=\"javascript\">    @Resolver(Recipe)     class RecipeResolver {         constructor(private recipeService: RecipeService) {}          @Query(returns =&gt; Recipe)         async recipe(@Arg(&quot;id&quot;) id: string) {             const recipe = await this.recipeService.findById(id);             if (recipe === undefined) {                 throw new RecipeNotFoundError(id);             }             return recipe;         }          @Query(returns =&gt; [Recipe])         recipes(@Args() { skip, take }: RecipesArgs) {             return this.recipeService.findAll({ skip, take });         }          @Mutation(returns =&gt; Recipe)         @Authorized()         addRecipe(             @Arg(&quot;newRecipeData&quot;) newRecipeData: NewRecipeInput,             @Ctx(&quot;user&quot;) user: User,         ): Promise&lt;Recipe&gt; {             return this.recipeService.addNew({ data: newRecipeData, user });         }          @Mutation(returns =&gt; Boolean)         @Authorized(Roles.Admin)         async removeRecipe(@Arg(&quot;id&quot;) id: string) {             try {                 await this.recipeService.removeById(id);                 return true;             } catch {                 return false;             }         }     } <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440 @Authorized() \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0434\u043b\u044f \u043d\u0435\u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 (\u0438\u043b\u0438 \u043e\u0431\u043b\u0430\u0434\u0430\u044e\u0449\u0438\u0445 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u044b\u043c\u0438 \u043f\u0440\u0430\u0432\u0430\u043c\u0438) \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u0440\u043e \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 <a href=\"https:\/\/typegraphql.com\/docs\/authorization.html\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>.<\/p>\n<p>  \u041f\u043e\u0440\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c NewRecipeInput \u0438 RecipesArgs:<\/p>\n<pre><code class=\"javascript\">\t@InputType() \tclass NewRecipeInput { \t\t@Field() \t\t@MaxLength(30) \t\ttitle: string;  \t\t@Field({ nullable: true }) \t\t@Length(30, 255) \t\tdescription?: string;  \t\t@Field(type =&gt; [String]) \t\t@ArrayMaxSize(30) \t\tingredients: string[]; \t}  \t@ArgsType() \tclass RecipesArgs { \t\t@Field(type =&gt; Int, { nullable: true }) \t\t@Min(0) \t\tskip: number = 0;  \t\t@Field(type =&gt; Int, { nullable: true }) \t\t@Min(1) @Max(50) \t\ttake: number = 25; \t} <\/code><\/pre>\n<p>  <a href=\"https:\/\/habr.com\/ru\/users\/length\/\" class=\"user_link\">Length<\/a>, <a href=\"https:\/\/habr.com\/ru\/users\/min\/\" class=\"user_link\">Min<\/a> \u0438 @ArrayMaxSize \u2014 \u044d\u0442\u043e \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u044b \u0438\u0437 \u043a\u043b\u0430\u0441\u0441\u0430-\u0432\u0430\u043b\u0438\u0434\u0430\u0442\u043e\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043f\u043e\u043b\u0435\u0439.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0448\u0430\u0433 \u2014 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u0431\u043e\u0440\u043a\u0430 \u0441\u0445\u0435\u043c\u044b. \u042d\u0442\u0438\u043c \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f buildSchema:<\/p>\n<pre><code class=\"javascript\">    const schema = await buildSchema({         resolvers: [RecipeResolver]     }); <\/code><\/pre>\n<p>  \u0418 \u0432\u0441\u0451! \u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0440\u0430\u0431\u043e\u0447\u0430\u044f \u0441\u0445\u0435\u043c\u0430 GraphQL. \u0412 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435 \u043e\u043d\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"javascript\">\ttype Recipe { \t\tid: ID! \t\ttitle: String! \t\tdescription: String \t\tcreationDate: Date! \t\tingredients: [String!]! \t} \tinput NewRecipeInput { \t\ttitle: String! \t\tdescription: String \t\tingredients: [String!]! \t} \ttype Query { \t\trecipe(id: ID!): Recipe \t\trecipes(skip: Int, take: Int): [Recipe!]! \t} \ttype Mutation { \t\taddRecipe(newRecipeData: NewRecipeInput!): Recipe! \t\tremoveRecipe(id: ID!): Boolean! \t} <\/code><\/pre>\n<p>  \u042d\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u0440 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 TypeGraphQL \u0443\u043c\u0435\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0449\u0451 \u043a\u0443\u0447\u0443 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438\u0437 \u0430\u0440\u0441\u0435\u043d\u0430\u043b\u0430 TS. \u0421\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u0432\u044b \u0443\u0436\u0435 \u0432\u0438\u0434\u0435\u043b\u0438 \ud83d\ude42<\/p>\n<h2><font color=\"#3AC1EF\">\u0427\u0442\u043e \u043d\u043e\u0432\u043e\u0433\u043e \u0432 1.0<\/font><\/h2>\n<p>  \u0412\u043a\u0440\u0430\u0442\u0446\u0435 \u043f\u0440\u043e\u0439\u0434\u0451\u043c\u0441\u044f \u043f\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c \u0440\u0435\u043b\u0438\u0437\u0430:<\/p>\n<h4><font color=\"#3AC1EF\">\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c<\/font><\/h4>\n<p>  TypeGraphQL \u2014 \u044d\u0442\u043e \u043f\u043e \u0441\u0443\u0442\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u043b\u043e\u0439 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u0438 \u043d\u0430\u0434 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 graphql-js, \u0438 \u043e\u043d \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435 \u0435\u0451. \u041d\u043e \u0442\u0435\u043f\u0435\u0440\u044c, \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 0.17, \u043d\u0430 \u0432\u044b\u0431\u043e\u0440\u043a\u0435 \u0438\u0437 25000 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0444\u0440\u0435\u0439\u043c\u0444\u043e\u0440\u043a \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 <b>\u0432 30 \u0440\u0430\u0437 \u043c\u0435\u043d\u044c\u0448\u0435 \u043e\u0432\u0435\u0440\u0445\u0435\u0434\u0430<\/b> \u2014 \u0441 500% \u0434\u043e 17% \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u0434\u043e 13%. \u041e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043d\u0435\u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432 <a href=\"https:\/\/typegraphql.com\/docs\/performance.html\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>.<\/p>\n<h4><font color=\"#3AC1EF\">\u0418\u0437\u043e\u043b\u044f\u0446\u0438\u044f \u0441\u0445\u0435\u043c<\/font><\/h4>\n<p>  \u0412 \u0441\u0442\u0430\u0440\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 \u0441\u0445\u0435\u043c\u0430 \u0441\u0442\u0440\u043e\u0438\u043b\u0430\u0441\u044c \u0438\u0437 \u0432\u0441\u0435\u0445 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c\u044b\u0445 \u0438\u0437 \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u043e\u0432. \u041a\u0430\u0436\u0434\u044b\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u044b\u0437\u043e\u0432 buildSchema \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u043b \u043e\u0434\u043d\u0443 \u0438 \u0442\u0443 \u0436\u0435 \u0441\u0445\u0435\u043c\u0443, \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0443\u044e \u0438\u0437 \u0432\u0441\u0435\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0432 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445. \u0422\u0435\u043f\u0435\u0440\u044c \u0436\u0435 \u0441\u0445\u0435\u043c\u044b \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0438 buildSchema \u0432\u044b\u0434\u0430\u0451\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0441 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438. \u0422\u043e \u0435\u0441\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u044f\u044f \u043b\u0438\u0448\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 resolvers \u043c\u044b \u043f\u043e\u0443\u043b\u0447\u0430\u0435\u043c \u0440\u0430\u0437\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0430\u0434 \u0441\u0445\u0435\u043c\u0430\u043c\u0438 GraphQL.<\/p>\n<h4><font color=\"#3AC1EF\">\u0414\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b \u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f<\/font><\/h4>\n<p>  \u042d\u0442\u043e \u0434\u0432\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0441\u0445\u0435\u043c\u044b: \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b GraphQL \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u044c SDL \u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u044b \u043f\u0440\u044f\u043c\u043e \u0432 \u0441\u0445\u0435\u043c\u0435. \u0422\u0430\u043a\u0436\u0435 \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0435\u0451 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0438\u043f \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u0438. \u041f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u043e\u043d\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u043e\u0432 @Directive \u0438 @Extensions \u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u043c \u043a \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044e \u0441\u0445\u0435\u043c\u044b. <a href=\"https:\/\/typegraphql.com\/docs\/directives.html\">\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f Directives<\/a>, <a href=\"https:\/\/typegraphql.com\/docs\/extensions.html\">\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f Extensions<\/a>.<\/p>\n<h4><font color=\"#3AC1EF\">\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u043f\u043e\u043b\u0435\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432<\/font><\/h4>\n<p>  \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0440\u0443\u0431\u0435\u0436 \u043f\u043e\u043b\u043d\u043e\u0439 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438 \u0441 GraphQL \u043b\u0435\u0436\u0430\u043b \u0437\u0434\u0435\u0441\u044c. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0434\u043b\u044f \u043f\u043e\u043b\u0435\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 @ObjectType:<\/p>\n<pre><code class=\"javascript\">    @InterfaceType()     abstract class IPerson {         @Field()         avatar(@Arg(&quot;size&quot;) size: number): string {             return `http:\/\/i.pravatar.cc\/${size}`;         }     } <\/code><\/pre>\n<p>  \u041d\u0435\u043c\u043d\u043e\u0433\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u044b <a href=\"https:\/\/typegraphql.com\/docs\/interfaces.html#resolvers-and-arguments\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<h4><font color=\"#3AC1EF\">\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u0438\u043d\u043f\u0443\u0442\u043e\u0432 \u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432<\/font><\/h4>\n<p>  \u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043a\u043b\u0430\u0441\u0441\u0430 \u0438\u043d\u043f\u0443\u0442\u0430 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438. \u042d\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0438 \u0431\u0430\u0433\u0438 \u0441 \u0438\u0445 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0435\u0439. Fixed.<\/p>\n<h2><font color=\"#3AC1EF\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/font><\/h2>\n<p>  \u0412 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u043f\u0440\u043e\u0435\u043a\u0442 \u043e\u0441\u0442\u0430\u0432\u0430\u043b\u0441\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u043a \u0438\u0434\u0435\u044f\u043c \u0438 \u043a\u0440\u0438\u0442\u0438\u043a\u0435, \u043e\u043f\u0435\u043d\u0441\u043e\u0440\u0441\u043d\u044b\u043c \u0438 \u0437\u0430\u0436\u0438\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c. 99% \u043a\u043e\u0434\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0441\u0430\u043c \u041c\u0438\u0445\u0430\u043b \u041b\u0438\u0442\u0435\u043a, \u043d\u043e \u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e \u0432\u043d\u0435\u0441\u043b\u043e \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0439 \u0432\u043a\u043b\u0430\u0434 \u0432 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435 TypeGraphQL. \u0422\u0435\u043f\u0435\u0440\u044c, \u0441 \u043d\u0430\u0440\u0430\u0441\u0442\u0430\u044e\u0449\u0435\u0439 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044c\u044e \u0438 \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u043e\u0439 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439, \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u0430\u0442\u044c \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c \u0432 \u0441\u0432\u043e\u0435\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438.<\/p>\n<p>  <a href=\"https:\/\/typegraphql.com\/\">\u0421\u0430\u0439\u0442<\/a><br \/>  <a href=\"https:\/\/github.com\/MichalLytek\/type-graphql\">\u0413\u0438\u0442\u0445\u0430\u0431<\/a><br \/>  <a href=\"https:\/\/typegraphql.com\/docs\/introduction.html\">\u0414\u043e\u043a\u0438<\/a><br \/>  <a href=\"https:\/\/twitter.com\/michallytek\">\u0422\u0432\u0438\u0442\u0442\u0435\u0440 \u041c\u0438\u0445\u0430\u043b\u0430<\/a><\/p>\n<p>  <a href=\"http:\/\/ruvds.com\/ru-rub?utm_source=habr&amp;utm_medium=article&amp;utm_campaign=kozl&amp;utm_content=typegraphql#order\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ou\/g5\/kh\/oug5kh6sjydt9llengsiebnp40w.png\"><\/a><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/516634\/\"> https:\/\/habr.com\/ru\/company\/ruvds\/blog\/516634\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/516634\/\"><a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/516634\/\"><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/oq\/_i\/tr\/oq_itrrbev4abzbws_dkqyyyd_e.png\"><\/div>\n<p><\/a><\/p>\n<h1><font color=\"#3AC1EF\">\u0417TypeGraphQL v1.0<\/font><\/h1>\n<p>  19 \u0430\u0432\u0433\u0443\u0441\u0442\u0430 \u0432\u044b\u0448\u0435\u043b \u0432 \u0440\u0435\u043b\u0438\u0437 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a TypeGraphQL, \u0443\u043f\u0440\u043e\u0449\u0430\u044e\u0449\u0438\u0439 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 GraphQL \u043d\u0430 Typescript. \u0417\u0430 \u0434\u0432\u0430 \u0441 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u043e\u0439 \u0433\u043e\u0434\u0430 \u043f\u0440\u043e\u0435\u043a\u0442 \u043e\u0431\u0437\u0430\u0432\u0451\u043b\u0441\u044f \u0441\u043e\u043b\u0438\u0434\u043d\u044b\u043c \u043a\u043e\u043c\u044c\u044e\u043d\u0438\u0442\u0438 \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0439 \u0438 \u0443\u0432\u0435\u0440\u0435\u043d\u043e \u043d\u0430\u0431\u0438\u0440\u0430\u0435\u0442 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044c. \u0421\u043f\u0443\u0441\u0442\u044f \u0431\u043e\u043b\u0435\u0435 650 \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432 \u0443 \u043d\u0435\u0433\u043e \u0431\u043e\u043b\u0435\u0435 5000 \u0437\u0432\u0451\u0437\u0434 \u0438 400 \u0444\u043e\u0440\u043a\u043e\u0432 \u043d\u0430 \u0433\u0438\u0442\u0445\u0430\u0431\u0435, \u043f\u043b\u043e\u0434 \u0443\u043f\u043e\u0440\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043e\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u041c\u0438\u0445\u0430\u043b\u0430 \u041b\u0438\u0442\u0435\u043a\u0430. \u0412 \u0432\u0435\u0440\u0441\u0438\u0438 1.0 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u043b\u0443\u0447\u0448\u0438\u043b\u0430\u0441\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0441\u0445\u0435\u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0438\u0437\u043e\u043b\u044f\u0446\u0438\u044e \u0438 \u0438\u0437\u0431\u0430\u0432\u0438\u043b\u0438\u0441\u044c \u043e\u0442 \u043f\u0440\u0435\u0436\u043d\u0435\u0439 \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438, \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0434\u0432\u0435 \u043a\u0440\u0443\u043f\u043d\u044b\u0435 \u0444\u0438\u0447\u0438 \u2014 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b \u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f, \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0431\u044b\u043b \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d \u043a \u043f\u043e\u043b\u043d\u043e\u0439 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438 \u0441 GraphQL.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-309049","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/309049","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=309049"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/309049\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=309049"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=309049"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=309049"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}