{"id":307877,"date":"2020-08-02T21:00:35","date_gmt":"2020-08-02T21:00:35","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=307877"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=307877","title":{"rendered":"\u041f\u0440\u0438\u043c\u0435\u0440\u044b GraphQL \u043d\u0430 Java \u0434\u043b\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0445 [\u0441\u043e Spring Boot]"},"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\/post\/513170\/\">\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440 GraphQL \u043d\u0430 Java \u0438 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 GraphQL \u0441\u043e Spring Boot.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/6s\/fu\/4-\/6sfu4-4rkpf7eamjtmaetnzwutu.png\"><br \/>  <em>\u0422\u0430\u043a\u0438\u043c \u0446\u044b\u043f\u043e\u0447\u043a\u0430\u043c \u0442\u043e\u0436\u0435 \u043d\u0440\u0430\u0432\u044f\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u044b GraphQL \u043d\u0430 Java \u0441\u043e Spring Boot!<\/em><\/p>\n<p>  <\/p>\n<p>GraphQL \u2014 \u044d\u0442\u043e \u044f\u0437\u044b\u043a \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0434\u043b\u044f <a href=\"https:\/\/dzone.com\/articles\/api-development-an-introductory-guide\" rel=\"nofollow\">API<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0434\u0430\u043d\u043d\u044b\u0445, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u043d\u0438 \u043d\u0443\u0436\u0434\u0430\u044e\u0442\u0441\u044f, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. GraphQL \u2014 \u044d\u0442\u043e \u0441\u0442\u0440\u043e\u0433\u043e \u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b, \u0438 \u0432\u0441\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0442\u0441\u044f \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441\u043e \u0441\u0445\u0435\u043c\u043e\u0439 GraphQL. <\/p>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440 GraphQL \u043d\u0430 Java \u0438 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 GraphQL \u0441\u043e Spring Boot.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h2 id=\"dobavlenie-zavisimostey-maven\">\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 Maven<\/h2>\n<p>  <\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043f\u0440\u0438\u043c\u0435\u0440 <a href=\"https:\/\/dzone.com\/articles\/what-is-spring-boot\" rel=\"nofollow\">Spring Boot<\/a> \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438.<\/p>\n<p>  <\/p>\n<ol>\n<li><strong>graphql-spring-boot-starter<\/strong> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u043b\u0435\u0442\u0430 GraphQL \u0438 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043f\u043e \u043f\u0443\u0442\u0438 <em>\/graphql<\/em>. \u041e\u043d \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 <strong>GraphQLSchema<\/strong> \u0431\u0438\u043d.<\/li>\n<li><strong>graphql-java<\/strong> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0445\u0435\u043c\u044b \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 \u0441\u0445\u0435\u043c GraphQL, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0441\u0442 \u0434\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f.<\/li>\n<li><strong>graphiql-spring-boot-starter<\/strong> \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 GraphQL \u0438 \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.\n<pre><code class=\"xml\">    &lt;dependency&gt;         &lt;groupId&gt;com.graphql-java&lt;\/groupId&gt;         &lt;artifactId&gt;graphql-spring-boot-starter&lt;\/artifactId&gt;         &lt;version&gt;5.0.2&lt;\/version&gt;     &lt;\/dependency&gt;     &lt;dependency&gt;         &lt;groupId&gt;com.graphql-java&lt;\/groupId&gt;         &lt;artifactId&gt;graphql-java-tools&lt;\/artifactId&gt;         &lt;version&gt;5.2.4&lt;\/version&gt;     &lt;\/dependency&gt;     &lt;dependency&gt;         &lt;groupId&gt;com.graphql-java&lt;\/groupId&gt;         &lt;artifactId&gt;graphiql-spring-boot-starter&lt;\/artifactId&gt;         &lt;version&gt;5.0.2&lt;\/version&gt;     &lt;\/dependency&gt;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u043e\u0442 \u043f\u043e\u043b\u043d\u043e\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430 POM.<\/p>\n<pre><code class=\"xml\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt; &lt;project xmlns=&quot;http:\/\/maven.apache.org\/POM\/4.0.0&quot;      xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot;      xsi:schemaLocation=&quot;http:\/\/maven.apache.org\/POM\/4.0.0 http:\/\/maven.apache.org\/xsd\/maven-4.0.0.xsd&quot;&gt; &lt;modelVersion&gt;4.0.0&lt;\/modelVersion&gt; &lt;groupId&gt;com.techshard.graphql&lt;\/groupId&gt; &lt;artifactId&gt;springboot-graphql&lt;\/artifactId&gt; &lt;version&gt;1.0-SNAPSHOT&lt;\/version&gt; &lt;parent&gt;     &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;     &lt;artifactId&gt;spring-boot-starter-parent&lt;\/artifactId&gt;     &lt;version&gt;2.1.6.RELEASE&lt;\/version&gt;     &lt;relativePath \/&gt; &lt;\/parent&gt; &lt;properties&gt;     &lt;project.build.sourceEncoding&gt;UTF-8&lt;\/project.build.sourceEncoding&gt;     &lt;project.reporting.outputEncoding&gt;UTF-8&lt;\/project.reporting.outputEncoding&gt; &lt;\/properties&gt; &lt;dependencies&gt;     &lt;dependency&gt;         &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;         &lt;artifactId&gt;spring-boot-starter-web&lt;\/artifactId&gt;     &lt;\/dependency&gt;     &lt;dependency&gt;         &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;         &lt;artifactId&gt;spring-boot-starter-data-jpa&lt;\/artifactId&gt;     &lt;\/dependency&gt;     &lt;dependency&gt;         &lt;groupId&gt;com.graphql-java&lt;\/groupId&gt;         &lt;artifactId&gt;graphql-spring-boot-starter&lt;\/artifactId&gt;         &lt;version&gt;5.0.2&lt;\/version&gt;     &lt;\/dependency&gt;     &lt;dependency&gt;         &lt;groupId&gt;com.graphql-java&lt;\/groupId&gt;         &lt;artifactId&gt;graphql-java-tools&lt;\/artifactId&gt;         &lt;version&gt;5.2.4&lt;\/version&gt;     &lt;\/dependency&gt;     &lt;dependency&gt;         &lt;groupId&gt;com.graphql-java&lt;\/groupId&gt;         &lt;artifactId&gt;graphiql-spring-boot-starter&lt;\/artifactId&gt;         &lt;version&gt;5.0.2&lt;\/version&gt;     &lt;\/dependency&gt;     &lt;dependency&gt;         &lt;groupId&gt;com.h2database&lt;\/groupId&gt;         &lt;artifactId&gt;h2&lt;\/artifactId&gt;         &lt;scope&gt;runtime&lt;\/scope&gt;     &lt;\/dependency&gt;     &lt;dependency&gt;         &lt;groupId&gt;org.projectlombok&lt;\/groupId&gt;         &lt;artifactId&gt;lombok&lt;\/artifactId&gt;         &lt;version&gt;1.18.8&lt;\/version&gt;         &lt;optional&gt;true&lt;\/optional&gt;     &lt;\/dependency&gt; &lt;\/dependencies&gt; &lt;build&gt;     &lt;plugins&gt;         &lt;plugin&gt;             &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;             &lt;artifactId&gt;spring-boot-maven-plugin&lt;\/artifactId&gt;         &lt;\/plugin&gt;     &lt;\/plugins&gt; &lt;\/build&gt; &lt;\/project&gt;<\/code><\/pre>\n<p>  <\/p>\n<h2 id=\"sozdanie-suschnosti-i-repozitoriya-jpa\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0438 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f JPA<\/h2>\n<p>  <\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <strong>Vehicle<\/strong> \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 <a href=\"https:\/\/dzone.com\/articles\/spring-data-jpa\" rel=\"nofollow\">JPA<\/a> \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439. \u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <strong>Lombok<\/strong>, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u0442\u0430\u043a\u043e\u0433\u043e \u043a\u0430\u043a \u0433\u0435\u0442\u0442\u0435\u0440\u044b, \u0441\u0435\u0442\u0442\u0435\u0440\u044b \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435.<\/p>\n<pre><code class=\"java\">package com.techshard.graphql.dao.entity; import lombok.Data; import lombok.EqualsAndHashCode; import javax.persistence.*; import java.io.Serializable; import java.time.LocalDate; @Data @EqualsAndHashCode @Entity public class Vehicle implements Serializable {     private static final long serialVersionUID = 1L;     @Id     @Column(name = &quot;ID&quot;, nullable = false)     @GeneratedValue(strategy = GenerationType.AUTO)     private int id;     @Column(name = &quot;type&quot;, nullable = false)     private String type;     @Column(name = &quot;model_code&quot;, nullable = false)     private String modelCode;     @Column(name = &quot;brand_name&quot;)     private String brandName;     @Column(name = &quot;launch_date&quot;)     private LocalDate launchDate;     private transient  String formattedDate;     \/\/ Getter and setter     public String getFormattedDate() {         return getLaunchDate().toString();     } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u043e\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 JPA.<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">package com.techshard.graphql.dao.repository; import com.techshard.graphql.dao.entity.Vehicle; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; @Repository public interface VehicleRepository extends JpaRepository&lt;Vehicle, Integer&gt; { }<\/code><\/pre>\n<p>  <\/p>\n<h2 id=\"shema-graphql\">\u0421\u0445\u0435\u043c\u0430 GraphQL<\/h2>\n<p>  <\/p>\n<p>GraphQL \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u044f\u0437\u044b\u043a\u043e\u043c \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0445\u0435\u043c GraphQL, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <a href=\"https:\/\/www.howtographql.com\/basics\/2-core-concepts\/\" rel=\"nofollow\">Schema Definition Language<\/a> (SDL \u2014 \u044f\u0437\u044b\u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u0445\u0435\u043c\u044b). \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u0445\u0435\u043c\u044b \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0432\u0441\u0435\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 API, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0432 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0435.<\/p>\n<p>  <\/p>\n<p>\u0422\u0438\u043f\u0438\u0447\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u0445\u0435\u043c\u044b GraphQL \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"ruby\">type Vehicle { id: ID!, type: String, modelCode: String, brandName: String, launchDate: String } type Query { vehicles(count: Int):[Vehicle] vehicle(id: ID):Vehicle } type Mutation { createVehicle(type: String!, modelCode: String!, brandName: String, launchDate: String):Vehicle }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043f\u0430\u043f\u043a\u0443 <strong>graphql<\/strong> \u0432 \u043f\u0430\u043f\u043a\u0435 <strong>src\/main\/resources<\/strong> \u0438 \u0432 \u043d\u0435\u0439 \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0444\u0430\u0439\u043b <strong>vehicleql.graphqls<\/strong>. \u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u0432\u044b\u0448\u0435\u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0438 \u0432\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0435\u0433\u043e \u0432 \u0444\u0430\u0439\u043b <strong>vehicleql.graphqls<\/strong>. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u0435\u043c \u0444\u0430\u0439\u043b\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043b\u044e\u0431\u043e\u0435 \u0438\u043c\u044f \u043f\u043e \u0432\u0430\u0448\u0435\u043c\u0443 \u0432\u044b\u0431\u043e\u0440\u0443. \u041f\u0440\u043e\u0441\u0442\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0443 \u0438\u043c\u0435\u043d\u0438 \u0444\u0430\u0439\u043b\u0430 \u0435\u0441\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 <strong>.graphqls<\/strong>.<\/p>\n<p>  <\/p>\n<p>\u0412 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0439 \u0432\u044b\u0448\u0435 \u0441\u0445\u0435\u043c\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0438\u043c\u0435\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0442\u0438\u043f. \u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u0442\u0438\u043f\u043e\u0432 \u0432 GraphQL \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u0430\u0437\u043e\u0432\u044b\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u043c \u0438 \u043e\u043d\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u0438\u043f \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043e\u0442 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0438 \u043f\u043e\u043b\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043e\u0431\u044a\u0435\u043a\u0442.<\/p>\n<p>  <\/p>\n<p>\u0412 \u043d\u0430\u0448\u0435\u0439 \u0441\u0445\u0435\u043c\u0435 \u0435\u0441\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c Vehicle, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u0448\u0438\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c \u0434\u043e\u043c\u0435\u043d\u0430. \u0422\u0438\u043f Query \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 GraphQL \u0434\u043b\u044f \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445. \u042d\u0442\u043e\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u043c, \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c, \u0438 \u043d\u043e\u0432\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c. \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b. \u042d\u0442\u043e \u0432\u0430\u0436\u043d\u043e \u0432 \u043c\u0438\u0440\u0435 GraphQL, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043c\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442.<\/p>\n<p>  <\/p>\n<p>\u041d\u0438\u0436\u0435 \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440.<\/p>\n<p>  <\/p>\n<p>\u0422\u0438\u043f <strong>Mutation<\/strong> \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>  <\/p>\n<h2 id=\"root-query\">Root Query<\/h2>\n<p>  <\/p>\n<p>\u041e\u0431\u044a\u0435\u043a\u0442\u044b Query \u0438\u043b\u0438 Mutation \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438 GraphQL. \u0423 \u043d\u0438\u0445 \u043d\u0435\u0442 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445. \u0412 \u0442\u0430\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043a\u043b\u0430\u0441\u0441\u044b \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u0442\u0435\u043b\u044f (resolver) \u0431\u0443\u0434\u0443\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c <strong>GraphQLQueryResolver<\/strong> \u0438\u043b\u0438 <strong>GraphQLMutationResolver<\/strong>. \u042d\u0442\u0438 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u0442\u0435\u043b\u0438 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043a\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043f\u043e\u043b\u044f\u043c\u0438 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0442\u0438\u043f\u0430\u0445.<\/p>\n<p>  <\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u0442\u0435\u043b\u0438 \u0434\u043b\u044f Vehicle.<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">package com.techshard.graphql.query; import com.coxautodev.graphql.tools.GraphQLQueryResolver; import com.techshard.graphql.dao.entity.Vehicle; import com.techshard.graphql.service.VehicleService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import java.util.List; import java.util.Optional; @Component public class VehicleQuery implements GraphQLQueryResolver {     @Autowired     private VehicleService vehicleService;     public List&lt;Vehicle&gt; getVehicles(final int count) {         return this.vehicleService.getAllVehicles(count);     }     public Optional&lt;Vehicle&gt; getVehicle(final int id) {         return this.vehicleService.getVehicle(id);     } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u043c\u0435\u0442\u043e\u0434\u044b \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <strong>Vehicle<\/strong> \u0438 \u0441\u043f\u0438\u0441\u043a\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 <strong>Vehicle<\/strong>. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438 \u044d\u0442\u0438 \u043c\u0435\u0442\u043e\u0434\u044b \u0432 \u043d\u0430\u0448\u0435\u0439 \u0441\u0445\u0435\u043c\u0435 \u0432\u044b\u0448\u0435. <\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u0443\u0442\u0430\u0446\u0438\u0439.<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">package com.techshard.graphql.mutation; import com.coxautodev.graphql.tools.GraphQLMutationResolver; import com.techshard.graphql.dao.entity.Vehicle; import com.techshard.graphql.service.VehicleService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import java.time.LocalDate; @Component public class VehicleMutation implements GraphQLMutationResolver {     @Autowired     private VehicleService vehicleService;     public Vehicle createVehicle(final String type, final String modelCode, final String brandName, final String launchDate) {         return this.vehicleService.createVehicle(type, modelCode, brandName, launchDate);     } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <strong>Vehicle<\/strong>, \u0438 \u044d\u0442\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u0438\u043f\u0443 <strong>Mutation<\/strong> \u0432 \u043d\u0430\u0448\u0435\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u0441\u0445\u0435\u043c\u044b. <\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0441\u0435\u0440\u0432\u0438\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438.<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">package com.techshard.graphql.service; import com.techshard.graphql.dao.entity.Vehicle; import com.techshard.graphql.dao.repository.VehicleRepository; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.time.LocalDate; import java.util.List; import java.util.Optional; import java.util.stream.Collectors; @Service public class VehicleService {     private final VehicleRepository vehicleRepository ;     public VehicleService(final VehicleRepository vehicleRepository) {         this.vehicleRepository = vehicleRepository ;     }     @Transactional     public Vehicle createVehicle(final String type,final String modelCode, final String brandName, final String launchDate) {         final Vehicle vehicle = new Vehicle();         vehicle.setType(type);         vehicle.setModelCode(modelCode);         vehicle.setBrandName(brandName);         vehicle.setLaunchDate(LocalDate.parse(launchDate));         return this.vehicleRepository.save(vehicle);     }     @Transactional(readOnly = true)     public List&lt;Vehicle&gt; getAllVehicles(final int count) {         return this.vehicleRepository.findAll().stream().limit(count).collect(Collectors.toList());     }     @Transactional(readOnly = true)     public Optional&lt;Vehicle&gt; getVehicle(final int id) {         return this.vehicleRepository.findById(id);     } }<\/code><\/pre>\n<p>  <\/p>\n<h2 id=\"testirovanie-prilozheniya\">\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h2>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0442\u0435\u043f\u0435\u0440\u044c \u0433\u043e\u0442\u043e\u0432\u043e \u043a \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e. \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Spring Boot \u0438 \u043e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u044d\u0442\u0443 \u0441\u0441\u044b\u043b\u043a\u0443: <a href=\"http:\/\/localhost:8080\/graphiql\" rel=\"nofollow\">http:\/\/localhost:8080\/graphiql<\/a>. \u041c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0438\u0436\u0435.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/bp\/zx\/la\/bpzxlamwohiapdkgnpaknbz0exu.png\"><\/p>\n<p>  <\/p>\n<p>\u0412 \u043f\u0440\u0430\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/bk\/sv\/al\/bksvalqij6ffx9p-oa269wespvk.png\"><\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0437\u0430\u043f\u0440\u043e\u0441.<\/p>\n<p>  <\/p>\n<pre><code class=\"ruby\">mutation {   createVehicle(type: &quot;car&quot;, modelCode: &quot;XYZ0192&quot;, brandName: &quot;XYZ&quot;, launchDate: &quot;2016-08-16&quot;)    {     id   } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 Vehicle. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c:<\/p>\n<p>  <\/p>\n<pre><code class=\"ruby\">{   &quot;data&quot;: {     &quot;createVehicle&quot;: {       &quot;id&quot;: &quot;1&quot;     }   } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0442\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0437\u0430\u043f\u0440\u043e\u0441, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<p>  <\/p>\n<pre><code class=\"ruby\">query {   vehicles(count: 1)    {     id,      type,      modelCode } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u044b\u0432\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"ruby\">{   &quot;data&quot;: {     &quot;vehicles&quot;: [       {         &quot;id&quot;: &quot;1&quot;,         &quot;type&quot;: &quot;bus&quot;,         &quot;modelCode&quot;: &quot;XYZ123&quot;       }     ]   } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043c\u044b \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u043b\u0435\u0439, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430\u0448 \u0437\u0430\u043f\u0440\u043e\u0441, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0438\u043b\u0438 \u0443\u0434\u0430\u043b\u0438\u0432 \u043f\u043e\u043b\u044f \u0438 \u0443\u0432\u0438\u0434\u0435\u0432 \u043d\u043e\u0432\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b.<\/p>\n<p>  <\/p>\n<h2 id=\"vyvod\">\u0412\u044b\u0432\u043e\u0434<\/h2>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 GraphQL \u043d\u0430 Java \u0441\u043e Spring Boot. \u041e\u0437\u043d\u0430\u043a\u043e\u043c\u044c\u0442\u0435\u0441\u044c \u0441 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439 <a href=\"https:\/\/graphql.org\/learn\/\" rel=\"nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u043b\u043d\u044b\u0439 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u044d\u0442\u043e\u0433\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0430 <a href=\"https:\/\/github.com\/swathisprasad\/graphql-with-spring-boot\" rel=\"nofollow\">GitHub<\/a>.<\/p>\n<p>  <\/p>\n<h2 id=\"dalneyshee-chtenie\">\u0414\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0435 \u0447\u0442\u0435\u043d\u0438\u0435<\/h2>\n<p>  <\/p>\n<p><a href=\"https:\/\/dzone.com\/articles\/5-features-of-graphql\" rel=\"nofollow\">Introduction to GraphQL<\/a><\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/dzone.com\/articles\/graphql-core-features-architecture-pros-and-cons\" rel=\"nofollow\">GraphQL: Core Features, Architecture, Pros, and Cons<\/a><\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0430\u0441\u044c \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0443\u0437\u043d\u0430\u0442\u044c \u043e GraphQL, \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u044c\u0442\u0435\u0441\u044c \u0441 \u044d\u0442\u043e\u0439 <a href=\"https:\/\/dzone.com\/articles\/your-guide-to-graphql-tutorials-and-articles\" rel=\"nofollow\">\u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0435\u0439 \u0443\u0447\u0435\u0431\u043d\u0438\u043a\u043e\u0432 \u0438 \u0441\u0442\u0430\u0442\u0435\u0439<\/a> \u043f\u043e \u0432\u0441\u0435\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u043c, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c \u0441 GraphQL.<\/p>\n<p>  <\/p>\n<blockquote><p>\u041f\u0440\u0438\u043c. \u041f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u0430.<br \/>  \u041d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u0442\u0430\u043a\u0436\u0435 \u0435\u0441\u0442\u044c \u00ab<a href=\"https:\/\/tproger.ru\/translations\/graphql-beginners-guide\/\" rel=\"nofollow\">\u0420\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e GraphQL \u0434\u043b\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0445<\/a>\u00bb<\/p><\/blockquote>\n<\/li>\n<\/ol>\n<\/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\/post\/513170\/\"> https:\/\/habr.com\/ru\/post\/513170\/<\/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\/post\/513170\/\">\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440 GraphQL \u043d\u0430 Java \u0438 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 GraphQL \u0441\u043e Spring Boot.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/6s\/fu\/4-\/6sfu4-4rkpf7eamjtmaetnzwutu.png\"><br \/>  <em>\u0422\u0430\u043a\u0438\u043c \u0446\u044b\u043f\u043e\u0447\u043a\u0430\u043c \u0442\u043e\u0436\u0435 \u043d\u0440\u0430\u0432\u044f\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u044b GraphQL \u043d\u0430 Java \u0441\u043e Spring Boot!<\/em><\/p>\n<p>  <\/p>\n<p>GraphQL \u2014 \u044d\u0442\u043e \u044f\u0437\u044b\u043a \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0434\u043b\u044f <a href=\"https:\/\/dzone.com\/articles\/api-development-an-introductory-guide\" rel=\"nofollow\">API<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0434\u0430\u043d\u043d\u044b\u0445, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u043d\u0438 \u043d\u0443\u0436\u0434\u0430\u044e\u0442\u0441\u044f, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. GraphQL \u2014 \u044d\u0442\u043e \u0441\u0442\u0440\u043e\u0433\u043e \u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b, \u0438 \u0432\u0441\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0442\u0441\u044f \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441\u043e \u0441\u0445\u0435\u043c\u043e\u0439 GraphQL. <\/p>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440 GraphQL \u043d\u0430 Java \u0438 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 GraphQL \u0441\u043e Spring Boot.<\/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-307877","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/307877","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=307877"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/307877\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=307877"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=307877"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=307877"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}