{"id":287577,"date":"2018-08-16T14:12:25","date_gmt":"2018-08-16T10:12:25","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=287577"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=287577","title":{"rendered":"\u041a\u0430\u043a \u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b GraphQL \u0434\u043b\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 InterSystems"},"content":{"rendered":"\n<div data-io-article-url=\"https:\/\/habr.com\/company\/intersystems\/blog\/358720\/\" class=\"post__text post__text-html js-mediator-article\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/f8a\/8f5\/35c\/f8a8f535c362014a6239d5d6a2b2fcdb.jpg\"><\/p>\n<p>  <\/p>\n<p>\u041e <a href=\"http:\/\/graphql.org\/\">GraphQL<\/a> \u0438 \u043e \u0442\u043e\u043c \u043a\u0430\u043a \u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043c\u043d\u043e\u0439 \u0443\u0436\u0435 \u0431\u044b\u043b\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043d\u043e \u0432 \u044d\u0442\u043e\u0439 <a href=\"https:\/\/habr.com\/company\/intersystems\/blog\/413717\/\">\u0441\u0442\u0430\u0442\u044c\u0435<\/a>. \u0417\u0434\u0435\u0441\u044c \u0436\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043f\u0440\u043e \u0442\u043e, \u043a\u0430\u043a\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0441\u0442\u043e\u044f\u043b\u0438 \u043f\u0435\u0440\u0435\u0434\u043e \u043c\u043d\u043e\u0439, \u0438 \u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 GraphQL \u0434\u043b\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c InterSystems.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h2 id=\"o-chem-statya\">\u041e \u0447\u0435\u043c \u0441\u0442\u0430\u0442\u044c\u044f<\/h2>\n<p>  <\/p>\n<ul>\n<li>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%90%D0%B1%D1%81%D1%82%D1%80%D0%B0%D0%BA%D1%82%D0%BD%D0%BE%D0%B5_%D1%81%D0%B8%D0%BD%D1%82%D0%B0%D0%BA%D1%81%D0%B8%D1%87%D0%B5%D1%81%D0%BA%D0%BE%D0%B5_%D0%B4%D0%B5%D1%80%D0%B5%D0%B2%D0%BE\">AST<\/a> \u043f\u043e GraphQL \u0437\u0430\u043f\u0440\u043e\u0441\u0443 \u0438 \u0435\u0433\u043e \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f<\/li>\n<li>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/li>\n<li>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043e\u0442\u0432\u0435\u0442\u0430 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/JSON\">JSON<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432\u0435\u0441\u044c \u0446\u0438\u043a\u043b \u043e\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0434\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u0442\u0432\u0435\u0442\u0430 \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u0445\u0435\u043c\u0435:<\/p>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/47c\/331\/dee\/47c331dee521d5c1129dd46879586f43.jpg\" alt=\"image\"><\/div>\n<p>  <\/p>\n<p>\u041a\u043b\u0438\u0435\u043d\u0442 \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0434\u0432\u0443\u0445 \u0442\u0438\u043f\u043e\u0432:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0417\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u0445\u0435\u043c\u044b.<br \/>  \u041d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441\u0445\u0435\u043c\u0430 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0443, \u043e\u0431 \u044d\u0442\u043e\u043c \u0447\u0443\u0442\u044c \u043f\u043e\u0437\u0436\u0435.<\/li>\n<li>\u0417\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435\/\u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f AST, \u0432\u0430\u043b\u044c\u0432\u0430\u0446\u0438\u044f \u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043e\u0442\u0432\u0435\u0442\u0430.<\/li>\n<\/ul>\n<p>  <\/p>\n<h2 id=\"generaciya-ast\">\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f AST<\/h2>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0432\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0440\u0435\u0448\u0438\u0442\u044c \u2014 \u044d\u0442\u043e \u0440\u0430\u0437\u0431\u043e\u0440 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e GraphQL \u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u044f \u0445\u043e\u0442\u0435\u043b \u043d\u0430\u0439\u0442\u0438 \u0432\u043d\u0435\u0448\u043d\u044e\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443, \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0432 \u043d\u0435\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c AST. \u041d\u043e \u043e\u0442 \u044d\u0442\u043e\u0439 \u0438\u0434\u0435\u0438 \u0440\u0435\u0448\u0438\u043b \u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043f\u043e \u0440\u044f\u0434\u0443 \u043f\u0440\u0438\u0447\u0438\u043d. \u042d\u0442\u043e \u0435\u0449\u0435 \u043e\u0434\u043d\u0430 \u0447\u0435\u0440\u043d\u0430\u044f \u043a\u043e\u0440\u043e\u0431\u043a\u0430, \u0434\u0430 \u0438 \u0434\u043e\u043b\u0433\u0438\u0435 callback \u0435\u0449\u0435 \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u043e\u0442\u043c\u0435\u043d\u044f\u043b. <\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a \u044f \u043f\u0440\u0438\u0448\u0435\u043b \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u0441\u0435\u0440, \u043d\u043e \u043e\u0442\u043a\u0443\u0434\u0430 \u0432\u0437\u044f\u0442\u044c \u0435\u0433\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435? \u0422\u0443\u0442 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043f\u0440\u043e\u0449\u0435, <a href=\"http:\/\/facebook.github.io\/graphql\/October2016\/\">GraphQL<\/a> \u2014 \u044d\u0442\u043e open source \u043f\u0440\u043e\u0435\u043a\u0442, \u0443 Facebook \u043e\u043d \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u043e\u043f\u0438\u0441\u0430\u043d, \u0434\u0430 \u0438 \u043d\u0430\u0439\u0442\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043f\u0430\u0440\u0441\u0435\u0440\u043e\u0432 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u043d\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u043e \u0442\u0440\u0443\u0434\u0430.<\/p>\n<p>  <\/p>\n<p>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 AST \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 <a href=\"http:\/\/facebook.github.io\/graphql\/October2016\/#Document\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<p>  <\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u0434\u0435\u0440\u0435\u0432\u043e:<\/p>\n<p>  <\/p>\n<pre><code>{   Sample_Company(id: 15) {     Name   } }<\/code><\/pre>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">AST<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>{   \"Kind\": \"Document\",   \"Location\": {     \"Start\": 1,     \"End\": 45   },   \"Definitions\": [     {       \"Kind\": \"OperationDefinition\",       \"Location\": {         \"Start\": 1,         \"End\": 45       },       \"Directives\": [],       \"VariableDefinitions\": [],       \"Name\": null,       \"Operation\": \"Query\",       \"SelectionSet\": {         \"Kind\": \"SelectionSet\",         \"Location\": {           \"Start\": 1,           \"End\": 45         },         \"Selections\": [           {             \"Kind\": \"FieldSelection\",             \"Location\": {               \"Start\": 5,               \"End\": 44             },             \"Name\": {               \"Kind\": \"Name\",               \"Location\": {                 \"Start\": 5,                 \"End\": 20               },               \"Value\": \"Sample_Company\"             },             \"Alias\": null,             \"Arguments\": [               {                 \"Kind\": \"Argument\",                 \"Location\": {                   \"Start\": 26,                   \"End\": 27                 },                 \"Name\": {                   \"Kind\": \"Name\",                   \"Location\": {                     \"Start\": 20,                     \"End\": 23                   },                   \"Value\": \"id\"                 },                 \"Value\": {                   \"Kind\": \"ScalarValue\",                   \"Location\": {                     \"Start\": 24,                     \"End\": 27                   },                   \"KindField\": 11,                   \"Value\": 15                 }               }             ],             \"Directives\": [],             \"SelectionSet\": {               \"Kind\": \"SelectionSet\",               \"Location\": {                 \"Start\": 28,                 \"End\": 44               },               \"Selections\": [                 {                   \"Kind\": \"FieldSelection\",                   \"Location\": {                     \"Start\": 34,                     \"End\": 42                   },                   \"Name\": {                     \"Kind\": \"Name\",                     \"Location\": {                       \"Start\": 34,                       \"End\": 42                     },                     \"Value\": \"Name\"                   },                   \"Alias\": null,                   \"Arguments\": [],                   \"Directives\": [],                   \"SelectionSet\": null                 }               ]             }           }         ]       }     }   ] }<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<h2 id=\"validaciya\">\u0412\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f<\/h2>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043d\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u0441\u0432\u043e\u0439\u0441\u0442\u0432, \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u0438\u0445 \u0442\u0438\u043f\u043e\u0432 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u0442\u043e \u0435\u0441\u0442\u044c \u0434\u0435\u0440\u0435\u0432\u043e \u043d\u0443\u0436\u043d\u043e \u0432\u0430\u043b\u0438\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u0420\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e \u043f\u0440\u043e\u0431\u0435\u0433\u0430\u0435\u043c\u0441\u044f \u043f\u043e \u0434\u0435\u0440\u0435\u0432\u0443 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0432\u044b\u0448\u0435\u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435. \u0412\u043e\u0442 \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 <a href=\"https:\/\/github.com\/intersystems-ru\/GraphQL\/blob\/master\/cls\/GraphQL\/Query\/Validation.cls\">\u043a\u043b\u0430\u0441\u0441<\/a>.<\/p>\n<p>  <\/p>\n<h2 id=\"generaciya-shemy\">\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0441\u0445\u0435\u043c\u044b<\/h2>\n<p>  <\/p>\n<p><strong>\u0421\u0445\u0435\u043c\u0430<\/strong> \u2014 \u044d\u0442\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c \u043a\u043b\u0430\u0441\u0441\u0430\u043c, \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c \u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0442\u0438\u043f\u043e\u0432 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u044d\u0442\u0438\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432.<\/p>\n<p>  <\/p>\n<p>\u0412 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 GraphQL \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u0438\u043b\u0438 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f\u0445 \u0441\u0445\u0435\u043c\u0430 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u043e \u0440\u0435\u0441\u043e\u043b\u0432\u0435\u0440\u0430\u043c. \u0420\u0435\u0441\u043e\u043b\u0432\u0435\u0440 \u2014 \u044d\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0442\u0438\u043f\u043e\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0441\u043e\u043b\u0432\u0435\u0440\u043e\u0432, \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u043e\u0442\u0432\u0435\u0442\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>type Query {   human(id: ID!): Human }  type Human {   name: String   appearsIn: [Episode]   starships: [Starship] }  enum Episode {   NEWHOPE   EMPIRE   JEDI }  type Starship {   name: String }<\/code><\/pre>\n<p>  <\/p>\n<pre><code>{   human(id: 1002) {     name     appearsIn     starships {       name     }   } }<\/code><\/pre>\n<p>  <\/p>\n<pre><code>{   \"data\": {     \"human\": {       \"name\": \"Han Solo\",       \"appearsIn\": [         \"NEWHOPE\",         \"EMPIRE\",         \"JEDI\"       ],       \"starships\": [         {           \"name\": \"Millenium Falcon\"         },         {           \"name\": \"Imperial shuttle\"         }       ]     }   } }<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u041d\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0445\u0435\u043c\u0443 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c \u0435\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443, \u043d\u0430\u0439\u0442\u0438 \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0438\u043b\u0438 \u043b\u0443\u0447\u0448\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b. \u041f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u044f \u0441\u0434\u0435\u043b\u0430\u043b, \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u043d\u0430\u0439\u0442\u0438 \u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u0430\u043b \u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0441\u0445\u0435\u043c\u044b. \u0422\u0430\u043a \u043a\u0430\u043a \u0443 GitHub \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0439 <a href=\"https:\/\/developer.github.com\/v4\/explorer\/\">GraphQL API<\/a>, \u0432\u0437\u044f\u0442\u044c \u043e\u0442\u0442\u0443\u0434\u0430 \u0441\u0445\u0435\u043c\u0443 \u043d\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u043e \u0442\u0440\u0443\u0434\u0430. \u041d\u043e \u0442\u0443\u0442 \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0438\u0441\u044f \u0441 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439, \u0442\u0430\u043c \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c, \u0447\u0442\u043e \u0441\u0445\u0435\u043c\u0430 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u0430\u0436 64 \u0442\u044b\u0441. \u0441\u0442\u0440\u043e\u043a. \u0420\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u044d\u0442\u043e\u043c \u043d\u0435 \u043e\u0447\u0435\u043d\u044c-\u0442\u043e \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c, \u0441\u0442\u0430\u043b \u0438\u0441\u043a\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0445\u0435\u043c\u0443.<\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043e\u0441\u043d\u043e\u0432\u043e\u0439 \u043d\u0430\u0448\u0438\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0421\u0423\u0411\u0414, \u0442\u043e \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0448\u0430\u0433\u0435 \u0440\u0435\u0448\u0438\u043b \u0441\u0430\u043c\u043e\u043c\u0443 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c GraphQL \u0434\u043b\u044f PostgreSQL \u0438 SQLite. \u0421 PostgreSQL \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0441\u0445\u0435\u043c\u0443 \u0432\u0441\u0435\u0433\u043e \u0432 22 \u0442\u044b\u0441. \u0441\u0442\u0440\u043e\u043a, \u0430 SQLite 18 \u0442\u044b\u0441. \u0441\u0442\u0440\u043e\u043a. \u042d\u0442\u043e \u0443\u0436\u0435 \u043b\u0443\u0447\u0448\u0435, \u043d\u043e \u044d\u0442\u043e \u0442\u043e\u0436\u0435 \u043d\u0435 \u043c\u0430\u043b\u043e, \u0441\u0442\u0430\u043b \u0438\u0441\u043a\u0430\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435.<\/p>\n<p>  <\/p>\n<p>\u041e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0441\u044f \u043d\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043b\u044f NodeJS, <a href=\"https:\/\/graphql.org\/graphql-js\/\">\u0441\u043e\u0431\u0440\u0430\u043b<\/a>, \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0441\u043e\u043b\u0432\u0435\u0440 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0441\u0445\u0435\u043c\u0443 \u0432\u0441\u0435\u0433\u043e \u0432 1800 \u0441\u0442\u0440\u043e\u043a \u2014 \u044d\u0442\u043e \u0443\u0436\u0435 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043b\u0443\u0447\u0448\u0435!<\/p>\n<p>  <\/p>\n<p>\u0420\u0430\u0437\u043e\u0431\u0440\u0430\u0432\u0448\u0438\u0441\u044c \u0432 \u0441\u0445\u0435\u043c\u0435, \u044f \u0440\u0435\u0448\u0438\u043b \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0431\u0435\u0437 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0440\u0435\u0441\u043e\u043b\u0432\u0435\u0440\u043e\u0432 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043c\u0435\u0442\u0430\u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043a\u043b\u0430\u0441\u0441\u0430\u0445 \u0438 \u0438\u0445 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0438 \u0434\u0440\u0443\u0433 \u043a \u0434\u0440\u0443\u0433\u0443 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u0432\u043e\u0435\u0439 \u0441\u0445\u0435\u043c\u044b \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0435\u0449\u0435\u0439:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u041d\u0435\u0437\u0430\u0447\u0435\u043c \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0435 \u0441 \u043d\u0443\u043b\u044f, \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u0441\u0445\u0435\u043c\u0443 \u0438\u0437 NodeJS, \u0443\u0431\u0440\u0430\u0442\u044c \u043e\u0442\u0442\u0443\u0434\u0430 \u0432\u0441\u0435 \u043b\u0438\u0448\u043d\u0435\u0435 \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432\u0441\u0435, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043c\u043d\u0435.<\/li>\n<li>\u0412 \u043a\u043e\u0440\u043d\u0435 \u0441\u0445\u0435\u043c\u044b \u0435\u0441\u0442\u044c \u0442\u0438\u043f <strong>queryType<\/strong>, \u0435\u0433\u043e \u043f\u043e\u043b\u0435 <strong>name<\/strong> \u043d\u0443\u0436\u043d\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c. \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0432\u0430 \u0442\u0438\u043f\u0430 \u043d\u0430\u0441 \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0442, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043e\u043d\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0441\u0442\u0430\u0434\u0438\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438.<\/li>\n<li>\u0412\u0441\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0438 \u0438\u0445 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 <strong>types<\/strong>.\n<pre><code>{ \"data\": {     \"__schema\": {         \"queryType\": {             \"name\": \"Query\"         },         \"mutationType\": null,         \"subscriptionType\": null,         \"types\":[...         ],         \"directives\":[...         ]     } } }<\/code><\/pre>\n<\/li>\n<li>\u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043d\u0443\u0436\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 <strong>Query<\/strong>, \u0430 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 <strong>fields<\/strong> \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432\u0441\u0435 \u043a\u043b\u0430\u0441\u0441\u044b, \u0438\u0445 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0438 \u0442\u0438\u043f\u044b \u044d\u0442\u0438\u0445 \u043a\u043b\u0430\u0441\u0441\u0430. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0438\u0437 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430.<\/li>\n<\/ul>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0434\u0432\u0443\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432, Example_City \u0438 Example_Country<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>{     \"kind\": \"OBJECT\",     \"name\": \"Query\",     \"description\": \"The query root of InterSystems GraphQL interface.\",     \"fields\": [         {             \"name\": \"Example_City\",             \"description\": null,             \"args\": [                 {                     \"name\": \"id\",                     \"description\": \"ID of the object\",                     \"type\": {                         \"kind\": \"SCALAR\",                         \"name\": \"ID\",                         \"ofType\": null                     },                     \"defaultValue\": null                 },                 {                     \"name\": \"Name\",                     \"description\": \"\",                     \"type\": {                         \"kind\": \"SCALAR\",                         \"name\": \"String\",                         \"ofType\": null                     },                     \"defaultValue\": null                 }             ],             \"type\": {                 \"kind\": \"LIST\",                 \"name\": null,                 \"ofType\": {                     \"kind\": \"OBJECT\",                     \"name\": \"Example_City\",                     \"ofType\": null                 }             },             \"isDeprecated\": false,             \"deprecationReason\": null         },         {             \"name\": \"Example_Country\",             \"description\": null,             \"args\": [                 {                     \"name\": \"id\",                     \"description\": \"ID of the object\",                     \"type\": {                         \"kind\": \"SCALAR\",                         \"name\": \"ID\",                         \"ofType\": null                     },                     \"defaultValue\": null                 },                 {                     \"name\": \"Name\",                     \"description\": \"\",                     \"type\": {                         \"kind\": \"SCALAR\",                         \"name\": \"String\",                         \"ofType\": null                     },                     \"defaultValue\": null                 }             ],             \"type\": {                 \"kind\": \"LIST\",                 \"name\": null,                 \"ofType\": {                     \"kind\": \"OBJECT\",                     \"name\": \"Example_Country\",                     \"ofType\": null                 }             },             \"isDeprecated\": false,             \"deprecationReason\": null         }     ],     \"inputFields\": null,     \"interfaces\": [],     \"enumValues\": null,     \"possibleTypes\": null }<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<ul>\n<li>\u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u043c\u0441\u044f \u043d\u0430 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0432\u044b\u0448\u0435 \u0438 \u0432 <strong>types<\/strong> \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u043b\u0430\u0441\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0436\u0435 \u043e\u043f\u0438\u0441\u0430\u043b\u0438 \u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u0435 <strong>Query<\/strong> \u0443\u0436\u0435 \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438, \u0442\u0438\u043f\u0430\u043c\u0438 \u0438 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435\u043c \u043a \u0434\u0440\u0443\u0433\u0438\u043c \u043a\u043b\u0430\u0441\u0441\u0430\u043c.<\/li>\n<\/ul>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0430\u043c\u0438\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>{ \"kind\": \"OBJECT\", \"name\": \"Example_City\", \"description\": \"\", \"fields\": [     {         \"name\": \"id\",         \"description\": \"ID of the object\",         \"args\": [],         \"type\": {             \"kind\": \"SCALAR\",             \"name\": \"ID\",             \"ofType\": null         },         \"isDeprecated\": false,         \"deprecationReason\": null     },     {         \"name\": \"Country\",         \"description\": \"\",         \"args\": [],         \"type\": {             \"kind\": \"OBJECT\",             \"name\": \"Example_Country\",             \"ofType\": null         },         \"isDeprecated\": false,         \"deprecationReason\": null     },     {         \"name\": \"Name\",         \"description\": \"\",         \"args\": [],         \"type\": {             \"kind\": \"SCALAR\",             \"name\": \"String\",             \"ofType\": null         },         \"isDeprecated\": false,         \"deprecationReason\": null     } ], \"inputFields\": null, \"interfaces\": [], \"enumValues\": null, \"possibleTypes\": null }, { \"kind\": \"OBJECT\", \"name\": \"Example_Country\", \"description\": \"\", \"fields\": [     {         \"name\": \"id\",         \"description\": \"ID of the object\",         \"args\": [],         \"type\": {             \"kind\": \"SCALAR\",             \"name\": \"ID\",             \"ofType\": null         },         \"isDeprecated\": false,         \"deprecationReason\": null     },     {         \"name\": \"City\",         \"description\": \"\",         \"args\": [],         \"type\": {             \"kind\": \"LIST\",             \"name\": null,             \"ofType\": {                 \"kind\": \"OBJECT\",                 \"name\": \"Example_City\",                 \"ofType\": null             }         },         \"isDeprecated\": false,         \"deprecationReason\": null     },     {         \"name\": \"Name\",         \"description\": \"\",         \"args\": [],         \"type\": {             \"kind\": \"SCALAR\",             \"name\": \"String\",             \"ofType\": null         },         \"isDeprecated\": false,         \"deprecationReason\": null     } ], \"inputFields\": null, \"interfaces\": [], \"enumValues\": null, \"possibleTypes\": null }<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<ul>\n<li>\u0412-\u0442\u0440\u0435\u0442\u044c\u0438\u0445, \u0432 <strong>types<\/strong> \u0443\u0436\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432\u0441\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0441\u043a\u0430\u043b\u044f\u0440\u043d\u044b\u0435 \u0442\u0438\u043f\u044b, \u0432\u0440\u043e\u0434\u0435 int, string \u0438 \u0442.\u0434., \u0441\u0432\u043e\u0438 \u0441\u043a\u0430\u043b\u044f\u0440\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0442\u0443\u0434\u0430 \u0436\u0435.<\/li>\n<\/ul>\n<p>  <\/p>\n<h2 id=\"generaciya-otveta\">\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043e\u0442\u0432\u0435\u0442\u0430<\/h2>\n<p>  <\/p>\n<p>\u0412\u043e\u0442 \u043c\u044b \u0438 \u0434\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c \u0434\u043e \u0441\u0430\u043c\u043e\u0439 \u0441\u043b\u043e\u0436\u043d\u043e\u0439 \u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438. \u041f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443 \u043a\u0430\u043a-\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0442\u0432\u0435\u0442. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c, \u043e\u0442\u0432\u0435\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 json \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u043d\u043e\u0432\u043e\u043c\u0443 GraphQL \u0437\u0430\u043f\u0440\u043e\u0441\u0443, \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u043a\u043b\u0430\u0441\u0441, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u043b\u043e\u0433\u0438\u043a\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c, \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0435 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u043c \u0435\u0441\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438\u0441\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0442.\u0435. \u0435\u0441\u043b\u0438 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u041c\u043e\u0441\u043a\u0432\u0435, \u0430 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u043f\u043e \u041b\u043e\u043d\u0434\u043e\u043d\u0443, \u043d\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0431\u0443\u0434\u0435\u0442, \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u044f\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u0412 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0438\u0442\u043e\u0433\u0435 \u0432 \u044d\u0442\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435 \u0431\u0443\u0434\u0435\u0442 SQL \u0437\u0430\u043f\u0440\u043e\u0441, \u043f\u043e\u0441\u043b\u0435 \u0435\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 JSON, \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c GraphQL \u0437\u0430\u043f\u0440\u043e\u0441\u0443. <\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>{   Sample_Company(id: 15) {     Name   } }<\/code><\/pre>\n<p>  <\/p>\n<pre><code>Class gqlcq.qsmytrXzYZmD4dvgwVIIA [ Not ProcedureBlock ] {  ClassMethod Execute(arg1) As %DynamicObject {     set result = {\"data\":{}}     set query1 = []      #SQLCOMPILE SELECT=ODBC     &amp;sql(DECLARE C1 CURSOR FOR          SELECT  Name          INTO :f1          FROM Sample.Company          WHERE id= :arg1  )   &amp;sql(OPEN C1)     &amp;sql(FETCH C1)     While (SQLCODE = 0) {         do query1.%Push({\"Name\":(f1)})         &amp;sql(FETCH C1)     }     &amp;sql(CLOSE C1)     set result.data.\"Sample_Company\" = query1      quit result }  ClassMethod IsUpToDate() As %Boolean {    quit:$$$comClassKeyGet(\"Sample.Company\",$$$cCLASShash)'=\"3B5DBWmwgoE\" $$$NO    quit $$$YES } }<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0430 \u0441\u0445\u0435\u043c\u0435:<\/p>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/f0f\/bd3\/e71\/f0fbd3e711eaa68e9012d9d2604a40c6.jpg\" alt=\"image\"><\/div>\n<p>  <\/p>\n<p>\u041d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043e\u0442\u0432\u0435\u0442 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0411\u0430\u0437\u043e\u0432\u044b\u0435<\/li>\n<li>\u0412\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b<br \/> \n<ul>\n<li>\u0422\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 <strong>many to one<\/strong><\/li>\n<\/ul>\n<\/li>\n<li>\u041b\u0438\u0441\u0442 \u0438\u0437 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0442\u0438\u043f\u043e\u0432<\/li>\n<li>\u041b\u0438\u0441\u0442 \u0438\u0437 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041d\u0438\u0436\u0435 \u044f \u043f\u0440\u0438\u0432\u0435\u043b \u0441\u0445\u0435\u043c\u0443, \u043a\u0430\u043a\u0438\u0435 \u0442\u0438\u043f\u044b \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0439 \u0435\u0449\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/1d2\/e33\/415\/1d2e33415987434a4d4e46dfb1e97ffb.jpg\"><\/p>\n<p>  <\/p>\n<h2 id=\"podvedem-itogi\">\u041f\u043e\u0434\u0432\u0435\u0434\u0435\u043c \u0438\u0442\u043e\u0433\u0438<\/h2>\n<p>  <\/p>\n<ul>\n<li><strong>\u041e\u0442\u0432\u0435\u0442<\/strong> \u2014 \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u043d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0441\u043b\u043e\u0436\u043d\u044b\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c.<\/li>\n<li><strong>\u0410\u0432\u0442\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u0430\u044f \u0441\u0445\u0435\u043c\u0430<\/strong> \u2014 \u0441\u0445\u0435\u043c\u0430 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0443 \u0445\u0440\u0430\u043d\u0438\u043c\u044b\u043c \u043a\u043b\u0430\u0441\u0441\u0430\u043c, \u0430 \u043d\u0435 \u043f\u043e \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u0440\u0435\u0441\u043e\u043b\u0432\u0435\u0440\u0430\u043c.<\/li>\n<li><strong>\u041f\u043e\u043b\u043d\u043e\u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0441\u0435\u0440<\/strong> \u2014 \u043f\u0430\u0440\u0441\u0435\u0440 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u0435\u0440\u0435\u0432\u043e \u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043b\u044e\u0431\u043e\u0439 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u2192 <a href=\"https:\/\/github.com\/intersystems-community\/GraphQL\">\u0421\u0441\u044b\u043b\u043a\u0430<\/a> \u043d\u0430 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<br \/>  \u2192 <a href=\"http:\/\/37.139.6.217:57773\/graphiql\/index.html\">\u0421\u0441\u044b\u043b\u043a\u0430<\/a> \u043d\u0430 \u0434\u0435\u043c\u043e \u0441\u0435\u0440\u0432\u0435\u0440<\/p>\n<\/div>\n<p>        <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d()}}}t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>     <br \/> \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\/company\/intersystems\/blog\/358720\/\"> https:\/\/habr.com\/company\/intersystems\/blog\/358720\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div data-io-article-url=\"https:\/\/habr.com\/company\/intersystems\/blog\/358720\/\" class=\"post__text post__text-html js-mediator-article\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/f8a\/8f5\/35c\/f8a8f535c362014a6239d5d6a2b2fcdb.jpg\"><\/p>\n<p>  <\/p>\n<p>\u041e <a href=\"http:\/\/graphql.org\/\">GraphQL<\/a> \u0438 \u043e \u0442\u043e\u043c \u043a\u0430\u043a \u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043c\u043d\u043e\u0439 \u0443\u0436\u0435 \u0431\u044b\u043b\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043d\u043e \u0432 \u044d\u0442\u043e\u0439 <a href=\"https:\/\/habr.com\/company\/intersystems\/blog\/413717\/\">\u0441\u0442\u0430\u0442\u044c\u0435<\/a>. \u0417\u0434\u0435\u0441\u044c \u0436\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043f\u0440\u043e \u0442\u043e, \u043a\u0430\u043a\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0441\u0442\u043e\u044f\u043b\u0438 \u043f\u0435\u0440\u0435\u0434\u043e \u043c\u043d\u043e\u0439, \u0438 \u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 GraphQL \u0434\u043b\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c InterSystems.<\/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-287577","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/287577","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=287577"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/287577\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=287577"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=287577"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=287577"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}