{"id":2010,"date":"2024-10-03T13:31:24","date_gmt":"2024-10-03T04:31:24","guid":{"rendered":"https:\/\/hyunsu.com\/wordpress\/?p=2010"},"modified":"2024-10-03T13:31:24","modified_gmt":"2024-10-03T04:31:24","slug":"graphql%ec%9d%98-federation%ec%97%90-%eb%8c%80%ed%95%b4%ec%84%9c","status":"publish","type":"post","link":"https:\/\/hyunsu.com\/wordpress\/?p=2010","title":{"rendered":"GraphQL\uc758 Federation\uc5d0 \ub300\ud574\uc11c"},"content":{"rendered":"\n<p><strong>GraphQL Federation<\/strong>\uc740 \uc5ec\ub7ec \uac1c\uc758 <strong>\ub9c8\uc774\ud06c\ub85c\uc11c\ube44\uc2a4<\/strong>\uc5d0\uc11c \uc81c\uacf5\ud558\ub294 \uc5ec\ub7ec \uac1c\uc758 GraphQL API\ub97c \ud558\ub098\uc758 \ud1b5\ud569\ub41c \uadf8\ub798\ud504\ucc98\ub7fc \uc0ac\uc6a9\ud560 \uc218 \uc788\uac8c \ud574\uc8fc\ub294 \uc544\ud0a4\ud14d\ucc98 \ud328\ud134\uc785\ub2c8\ub2e4. \uc774\ub97c \ud1b5\ud574 \ub300\uaddc\ubaa8 \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc5d0\uc11c <strong>\uc11c\ube44\uc2a4 \uac04 \ubd84\ub9ac<\/strong>\uc640 <strong>\ub370\uc774\ud130 \ud1b5\ud569<\/strong>\uc744 \uc720\uc5f0\ud558\uac8c \ucc98\ub9ac\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. <strong>Apollo Federation<\/strong>\uc774 \ub300\ud45c\uc801\uc778 \ub3c4\uad6c\uc774\uba70, \uc8fc\ub85c \ub300\uaddc\ubaa8 \ub9c8\uc774\ud06c\ub85c\uc11c\ube44\uc2a4 \uc544\ud0a4\ud14d\ucc98\uc5d0\uc11c GraphQL API\ub97c \ud1b5\ud569\ud560 \ub54c \uc0ac\uc6a9\ub429\ub2c8\ub2e4.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1. Federation\uc774 \ud544\uc694\ud55c \uc774\uc720<\/strong><\/h3>\n\n\n\n<p>\uc804\ud1b5\uc801\uc778 GraphQL \uc11c\ubc84\uc5d0\uc11c\ub294 \ud558\ub098\uc758 \uc11c\ubc84\uc5d0\uc11c \ubaa8\ub4e0 \ub370\uc774\ud130\ub97c \uc81c\uacf5\ud558\ub294 \ubc29\uc2dd\uc774 \uc77c\ubc18\uc801\uc785\ub2c8\ub2e4. \ud558\uc9c0\ub9cc \ub300\uaddc\ubaa8 \uc2dc\uc2a4\ud15c\uc5d0\uc11c\ub294 \uc5ec\ub7ec \uc11c\ube44\uc2a4\uac00 \uac01\uac01\uc758 \ub370\uc774\ud130 \uc18c\uc2a4\ub97c \uac00\uc9c0\uace0 \uc788\uace0, \uc774\ub7ec\ud55c \ub370\uc774\ud130\ub97c \ud558\ub098\uc758 GraphQL API\ub85c \ud1b5\ud569\ud574\uc11c \uc0ac\uc6a9\ud574\uc57c \ud558\ub294 \uacbd\uc6b0\uac00 \ub9ce\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<p><strong>Federation<\/strong>\uc740 \uc774\ub7ec\ud55c \ubb38\uc81c\ub97c \ud574\uacb0\ud558\uae30 \uc704\ud574 \uc124\uacc4\ub418\uc5c8\uc2b5\ub2c8\ub2e4. Federation\uc744 \uc0ac\uc6a9\ud558\uba74 \uac01\uac01\uc758 **\uc11c\ube0c\uc11c\ube44\uc2a4(Subgraph)**\uac00 \ub3c5\ub9bd\uc801\uc73c\ub85c \uc790\uc2e0\uc758 \ub370\uc774\ud130\ub97c \uc81c\uacf5\ud558\uba74\uc11c\ub3c4, <strong>Gateway<\/strong>\ub97c \ud1b5\ud574 \ubaa8\ub4e0 \ub370\uc774\ud130\ub97c \ud558\ub098\uc758 \ud1b5\ud569\ub41c \uadf8\ub798\ud504\ucc98\ub7fc \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Federation\uc744 \uc0ac\uc6a9\ud558\ub294 \uc774\uc720:<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\ub9c8\uc774\ud06c\ub85c\uc11c\ube44\uc2a4 \uc544\ud0a4\ud14d\ucc98 \uc9c0\uc6d0<\/strong>: \uac01 \uc11c\ube44\uc2a4\ub294 \ub3c5\ub9bd\uc801\uc73c\ub85c \uac1c\ubc1c \ubc0f \ubc30\ud3ec\ub418\uba70, GraphQL API\ub3c4 \uac01 \uc11c\ube44\uc2a4\uc5d0 \ub9de\uac8c \ubd84\ub9ac\ub418\uc5b4 \uc788\uc2b5\ub2c8\ub2e4.<\/li>\n\n\n\n<li><strong>\ub370\uc774\ud130 \ud1b5\ud569<\/strong>: Federation\uc740 \uc5ec\ub7ec \uc11c\ube44\uc2a4\uc5d0\uc11c \uc81c\uacf5\ud558\ub294 \ub370\uc774\ud130\ub97c \ud55c \uacf3\uc5d0\uc11c \ubaa8\uc544 \uc0ac\uc6a9\ud560 \uc218 \uc788\uac8c \ud574\uc90d\ub2c8\ub2e4.<\/li>\n\n\n\n<li><strong>\ud655\uc7a5\uc131<\/strong>: \uc11c\ube44\uc2a4\ub97c \ubd84\ub9ac\ud558\uace0 \ub3c5\ub9bd\uc801\uc73c\ub85c \ud655\uc7a5\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc11c\ube44\uc2a4 \uac04 \uc758\uc874\uc131\uc774 \ub0ae\uc544\uc9c0\uace0, \uac01 \uc11c\ube44\uc2a4\uac00 \ub3c5\ub9bd\uc801\uc73c\ub85c \uc6b4\uc601\ub429\ub2c8\ub2e4.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2. Federation\uc758 \uad6c\uc131 \uc694\uc18c<\/strong><\/h3>\n\n\n\n<p>Federation\uc744 \uad6c\uc131\ud558\ub294 \ud575\uc2ec \uc694\uc18c\ub294 \ub450 \uac00\uc9c0\uc785\ub2c8\ub2e4:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Subgraph (\uc11c\ube0c\uadf8\ub798\ud504)<\/strong>: \uac01 \uc11c\ube44\uc2a4\uac00 \uc790\uccb4\uc801\uc73c\ub85c \uc81c\uacf5\ud558\ub294 \ub3c5\ub9bd\uc801\uc778 GraphQL API\uc785\ub2c8\ub2e4. \uac01 \uc11c\ube44\uc2a4\ub294 \uc790\uccb4\uc801\uc73c\ub85c \uc2a4\ud0a4\ub9c8\ub97c \uc815\uc758\ud558\uace0, \ud574\ub2f9 \ub370\uc774\ud130\ub97c \ucc98\ub9ac\ud569\ub2c8\ub2e4.<\/li>\n\n\n\n<li><strong>Apollo Gateway (\uac8c\uc774\ud2b8\uc6e8\uc774)<\/strong>: \uc5ec\ub7ec \uac1c\uc758 \uc11c\ube0c\uadf8\ub798\ud504\ub97c \ud558\ub098\uc758 \ud1b5\ud569\ub41c \uadf8\ub798\ud504\ub85c \uacb0\ud569\ud558\ub294 \uc5ed\ud560\uc744 \ud569\ub2c8\ub2e4. \ud074\ub77c\uc774\uc5b8\ud2b8\ub294 \uc774 \uac8c\uc774\ud2b8\uc6e8\uc774\ub97c \ud1b5\ud574 \uac01\uac01\uc758 \uc11c\ube0c\uadf8\ub798\ud504\uc758 \ub370\uc774\ud130\ub97c \uc694\uccad\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/li>\n<\/ol>\n\n\n\n<h4 class=\"wp-block-heading\">\uadf8\ub9bc\uc73c\ub85c \ubcf4\uba74 \ub2e4\uc74c\uacfc \uac19\uc740 \uad6c\uc870\ub97c \uac00\uc9d1\ub2c8\ub2e4:<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>           \ud074\ub77c\uc774\uc5b8\ud2b8<br>                |<br>           [Apollo Gateway]<br>           \/       |      \\<br>  [Subgraph 1] [Subgraph 2] [Subgraph 3]<br><\/code><\/pre>\n\n\n\n<p>\uac8c\uc774\ud2b8\uc6e8\uc774\uac00 \uac01 \uc11c\ube0c\uadf8\ub798\ud504\uc5d0 \ucffc\ub9ac\ub97c \uc804\ub2ec\ud558\uace0, \uacb0\uacfc\ub97c \ud074\ub77c\uc774\uc5b8\ud2b8\uc5d0 \ubc18\ud658\ud558\ub294 \ubc29\uc2dd\uc785\ub2c8\ub2e4.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3. Federation\uc758 \ud575\uc2ec \uae30\ub2a5<\/strong><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>1) Key and Extend (\ud0a4\uc640 \ud655\uc7a5)<\/strong><\/h4>\n\n\n\n<p>Federation\uc758 \ud575\uc2ec \uae30\ub2a5 \uc911 \ud558\ub098\ub294 <strong>\ud655\uc7a5\uc131<\/strong>\uc785\ub2c8\ub2e4. **<code>@key<\/code>**\uc640 <strong><code>@extend<\/code><\/strong> \ub514\ub809\ud2f0\ube0c\ub97c \uc0ac\uc6a9\ud574 \uac01 \uc11c\ube0c\uadf8\ub798\ud504\uc758 \uc2a4\ud0a4\ub9c8\ub97c \uacb0\ud569\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>@key<\/strong>: \uac01 \uc11c\ube0c\uadf8\ub798\ud504\uc5d0\uc11c \uc5d4\ud130\ud2f0\ub97c \uc2dd\ubcc4\ud558\ub294 \ud544\ub4dc\ub97c \uc815\uc758\ud569\ub2c8\ub2e4.<\/li>\n\n\n\n<li><strong>@extend<\/strong>: \ub2e4\ub978 \uc11c\ube0c\uadf8\ub798\ud504\uc5d0\uc11c \uc815\uc758\ud55c \uc5d4\ud130\ud2f0\ub97c \ud655\uc7a5\ud560 \ub54c \uc0ac\uc6a9\ud569\ub2c8\ub2e4.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">\uc608\uc2dc:<\/h4>\n\n\n\n<p><code>User<\/code> \ub370\uc774\ud130\ub97c \uc0ac\uc6a9\uc790 \uc11c\ube44\uc2a4\uc5d0\uc11c \uc815\uc758\ud558\uace0, \uc8fc\ubb38 \uc11c\ube44\uc2a4\uc5d0\uc11c \uc0ac\uc6a9\uc790\uc758 \uc8fc\ubb38 \ub370\uc774\ud130\ub97c \ud655\uc7a5\ud558\ub824\uace0 \ud560 \ub54c, \uac01 \uc11c\ube0c\uadf8\ub798\ud504\ub294 \ub2e4\uc74c\uacfc \uac19\uc774 \uc815\uc758\ub429\ub2c8\ub2e4.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>User \uc11c\ube44\uc2a4\uc758 Subgraph<\/strong>:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>type User @key(fields: \"id\") {<br>  id: ID!<br>  name: String<br>  email: String<br>}<br><\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\uc5ec\uae30\uc11c <code>@key(fields: \"id\")<\/code>\ub294 <code>User<\/code> \ud0c0\uc785\uc758 <code>id<\/code> \ud544\ub4dc\uac00 \uc0ac\uc6a9\uc790 \uc5d4\ud130\ud2f0\ub97c \uc2dd\ubcc4\ud558\ub294 \uace0\uc720 \uac12\uc784\uc744 \ub098\ud0c0\ub0c5\ub2c8\ub2e4.<\/li>\n<\/ul>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li><strong>Order \uc11c\ube44\uc2a4\uc758 Subgraph<\/strong>:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>extend type User @key(fields: \"id\") {<br>  id: ID! @external<br>  orders: [Order]<br>}<br><br>type Order {<br>  id: ID!<br>  product: String<br>  price: Float<br>}<br><\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\uc5ec\uae30\uc11c **<code>@extend<\/code>**\ub294 <strong>User<\/strong> \ud0c0\uc785\uc744 \ud655\uc7a5\ud558\uace0, <code>@key<\/code>\ub97c \ud1b5\ud574 <code>id<\/code>\ub85c \uc0ac\uc6a9\uc790 \uc5d4\ud130\ud2f0\ub97c \uc2dd\ubcc4\ud569\ub2c8\ub2e4. **<code>@external<\/code>**\uc740 <code>id<\/code> \ud544\ub4dc\uac00 \ub2e4\ub978 \uc11c\ube0c\uadf8\ub798\ud504(User \uc11c\ube44\uc2a4)\uc5d0\uc11c \uc81c\uacf5\ub41c\ub2e4\ub294 \uac83\uc744 \uc758\ubbf8\ud569\ub2c8\ub2e4.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>2) Entities\uc640 Reference Resolver<\/strong><\/h4>\n\n\n\n<p>\uac8c\uc774\ud2b8\uc6e8\uc774\uac00 \uc5ec\ub7ec \uc11c\ube0c\uadf8\ub798\ud504 \uac04\uc5d0 \ub370\uc774\ud130\ub97c \uacb0\ud569\ud560 \ub54c, Federation\uc740 <strong>entities<\/strong>\uc640 <strong>reference resolver<\/strong>\ub97c \uc0ac\uc6a9\ud569\ub2c8\ub2e4.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Entity<\/strong>: \uac01 \uc11c\ube0c\uadf8\ub798\ud504\uc5d0\uc11c <code>@key<\/code>\ub85c \uc815\uc758\ub41c \uc5d4\ud130\ud2f0\ub294 \uac8c\uc774\ud2b8\uc6e8\uc774\ub97c \ud1b5\ud574 \ud1b5\ud569\ub41c \uadf8\ub798\ud504\uc5d0\uc11c \uacf5\uc720\ub429\ub2c8\ub2e4.<\/li>\n\n\n\n<li><strong>Reference Resolver<\/strong>: <code>@key<\/code>\ub85c \uc2dd\ubcc4\ub41c \uc5d4\ud130\ud2f0\ub97c \ub2e4\ub978 \uc11c\ube0c\uadf8\ub798\ud504\uc5d0\uc11c \ucc38\uc870\ud560 \uc218 \uc788\ub3c4\ub85d \ub9ac\uc878\ubc84\ub97c \uc81c\uacf5\ud569\ub2c8\ub2e4.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>4. Apollo Federation \uc124\uc815<\/strong><\/h3>\n\n\n\n<p>\ub2e4\uc74c\uc740 Apollo Federation\uc744 \uc2e4\uc81c\ub85c \uc124\uc815\ud558\ub294 \uacfc\uc815\uc785\ub2c8\ub2e4.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>1) \uac01 \uc11c\ube44\uc2a4\uc758 Subgraph \uc124\uc815<\/strong><\/h4>\n\n\n\n<p>\uba3c\uc800, \uac01\uac01\uc758 \uc11c\ube0c\uadf8\ub798\ud504(Subgraph)\ub97c \uc124\uc815\ud574\uc57c \ud569\ub2c8\ub2e4. \uac01 \uc11c\ube0c\uadf8\ub798\ud504\ub294 \ub3c5\ub9bd\uc801\uc778 GraphQL \uc11c\ubc84\ub85c \ub3d9\uc791\ud558\uba70, \uc11c\ub85c \ub2e4\ub978 \ub370\uc774\ud130\ub97c \uc81c\uacf5\ud569\ub2c8\ub2e4.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">\uc608\uc2dc: <strong>User \uc11c\ube44\uc2a4<\/strong><\/h5>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>const { ApolloServer, gql } = require('apollo-server');<br>const { buildFederatedSchema } = require('@apollo\/federation');<br><br>const typeDefs = gql`<br>  type User @key(fields: \"id\") {<br>    id: ID!<br>    name: String<br>    email: String<br>  }<br><br>  type Query {<br>    users: [User]<br>  }<br>`;<br><br>const resolvers = {<br>  Query: {<br>    users() {<br>      return [<br>        { id: '1', name: 'John Doe', email: 'john@example.com' },<br>        { id: '2', name: 'Jane Doe', email: 'jane@example.com' }<br>      ];<br>    }<br>  }<br>};<br><br>const server = new ApolloServer({<br>  schema: buildFederatedSchema([{ typeDefs, resolvers }])<br>});<br><br>server.listen({ port: 4001 }).then(({ url }) => {<br>  console.log(`User service running at ${url}`);<br>});<br><\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">\uc608\uc2dc: <strong>Order \uc11c\ube44\uc2a4<\/strong><\/h5>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>const { ApolloServer, gql } = require('apollo-server');<br>const { buildFederatedSchema } = require('@apollo\/federation');<br><br>const typeDefs = gql`<br>  extend type User @key(fields: \"id\") {<br>    id: ID! @external<br>    orders: [Order]<br>  }<br><br>  type Order {<br>    id: ID!<br>    product: String<br>    price: Float<br>  }<br><br>  type Query {<br>    orders: [Order]<br>  }<br>`;<br><br>const resolvers = {<br>  User: {<br>    orders(user) {<br>      return [<br>        { id: '1', product: 'Laptop', price: 1000.0 },<br>        { id: '2', product: 'Phone', price: 500.0 }<br>      ];<br>    }<br>  },<br>  Query: {<br>    orders() {<br>      return [<br>        { id: '1', product: 'Laptop', price: 1000.0 },<br>        { id: '2', product: 'Phone', price: 500.0 }<br>      ];<br>    }<br>  }<br>};<br><br>const server = new ApolloServer({<br>  schema: buildFederatedSchema([{ typeDefs, resolvers }])<br>});<br><br>server.listen({ port: 4002 }).then(({ url }) => {<br>  console.log(`Order service running at ${url}`);<br>});<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>2) \uac8c\uc774\ud2b8\uc6e8\uc774 \uc124\uc815<\/strong><\/h4>\n\n\n\n<p>\uc774\uc81c <strong>Apollo Gateway<\/strong>\ub97c \uc124\uc815\ud558\uc5ec \uac01\uac01\uc758 \uc11c\ube0c\uadf8\ub798\ud504\ub97c \ud558\ub098\uc758 \ud1b5\ud569\ub41c GraphQL API\ub85c \uc5f0\uacb0\ud569\ub2c8\ub2e4.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Apollo Gateway \uc124\uc815:<\/h5>\n\n\n\n<pre class=\"wp-block-preformatted\">javascript\ucf54\ub4dc \ubcf5\uc0ac<code>const { ApolloServer } = require('apollo-server');\nconst { ApolloGateway } = require('@apollo\/gateway');\n\nconst gateway = new ApolloGateway({\n  serviceList: [\n    { name: 'users', url: 'http:\/\/localhost:4001' },\n    { name: 'orders', url: 'http:\/\/localhost:4002' }\n  ]\n});\n\nconst server = new ApolloServer({\n  gateway,\n  subscriptions: false\n});\n\nserver.listen({ port: 4000 }).then(({ url }) =&gt; {\n  console.log(`Gateway running at ${url}`);\n});\n<\/code><\/pre>\n\n\n\n<p>\uac8c\uc774\ud2b8\uc6e8\uc774\ub294 \uac01 \uc11c\ube0c\uadf8\ub798\ud504(User \uc11c\ube44\uc2a4\uc640 Order \uc11c\ube44\uc2a4)\ub97c \uc5f0\uacb0\ud558\uace0, \ud074\ub77c\uc774\uc5b8\ud2b8\ub85c\ubd80\ud130 \uc694\uccad\uc744 \ubc1b\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>3) \ud074\ub77c\uc774\uc5b8\ud2b8\uc5d0\uc11c \ucffc\ub9ac \uc2e4\ud589<\/strong><\/h4>\n\n\n\n<p>\uc774\uc81c \ud074\ub77c\uc774\uc5b8\ud2b8\ub294 \uac8c\uc774\ud2b8\uc6e8\uc774\ub97c \ud1b5\ud574 \ud1b5\ud569\ub41c GraphQL API\ub97c \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>query {<br>  users {<br>    id<br>    name<br>    orders {<br>      product<br>      price<br>    }<br>  }<br>}<br><\/code><\/pre>\n\n\n\n<p>\uc774 \ucffc\ub9ac\ub294 <code>users<\/code> \ud544\ub4dc\ub97c \ud1b5\ud574 \uc0ac\uc6a9\uc790 \ubaa9\ub85d\uc744 \uac00\uc838\uc624\uace0, \uac01 \uc0ac\uc6a9\uc790\uc758 \uc8fc\ubb38 \ub370\uc774\ud130\ub97c \uac00\uc838\uc635\ub2c8\ub2e4. \uac8c\uc774\ud2b8\uc6e8\uc774\uac00 \uac01 \uc11c\ube44\uc2a4\uc5d0 \ucffc\ub9ac\ub97c \ubd84\ubc30\ud558\uace0, \ucd5c\uc885\uc801\uc73c\ub85c \ud074\ub77c\uc774\uc5b8\ud2b8\uc5d0 \ub370\uc774\ud130\ub97c \ubc18\ud658\ud569\ub2c8\ub2e4.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>5. Federation\uc758 \uc7a5\uc810<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\ub9c8\uc774\ud06c\ub85c\uc11c\ube44\uc2a4 \uc544\ud0a4\ud14d\ucc98\uc640\uc758 \uc790\uc5f0\uc2a4\ub7ec\uc6b4 \ud1b5\ud569<\/strong>: \uac01 \uc11c\ube44\uc2a4\ub294 \ub3c5\ub9bd\uc801\uc73c\ub85c \uad00\ub9ac\ub418\uba70, \uc774\ub97c \ud1b5\ud569\ud558\uc5ec \ud558\ub098\uc758 \uadf8\ub798\ud504\ub85c \uc81c\uacf5\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/li>\n\n\n\n<li><strong>\ud655\uc7a5\uc131<\/strong>: \uac1c\ubcc4 \uc11c\ube44\uc2a4\ub294 \ub3c5\ub9bd\uc801\uc73c\ub85c \uac1c\ubc1c \ubc0f \ubc30\ud3ec\ub420 \uc218 \uc788\uc5b4, \uc2dc\uc2a4\ud15c \uc804\uccb4\uc758 \ud655\uc7a5\uc131\uc774 \ud5a5\uc0c1\ub429\ub2c8\ub2e4.<\/li>\n\n\n\n<li><strong>\uc77c\uad00\ub41c GraphQL API \uc81c\uacf5<\/strong>: \ud074\ub77c\uc774\uc5b8\ud2b8\ub294 \uc5ec\ub7ec \uac1c\uc758 \uc11c\ube44\uc2a4\ub85c \ub098\ub258\uc5b4 \uc788\ub294 \ub370\uc774\ud130\ub97c \ud558\ub098\uc758 \ud1b5\ud569\ub41c \uadf8\ub798\ud504\uc5d0\uc11c \ucffc\ub9ac\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>6. Federation\uc758 \ub2e8\uc810 \ubc0f \uace0\ub824\uc0ac\ud56d<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\ubcf5\uc7a1\uc131 \uc99d\uac00<\/strong>: \uc11c\ube44\uc2a4\uac00 \ub9ce\uc544\uc9c8\uc218\ub85d Federation \uad6c\uc870\uac00 \ubcf5\uc7a1\ud574\uc9c8 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uac01 \uc11c\ube0c\uadf8\ub798\ud504 \uac04\uc758 \uc758\uc874\uc131\uc744 \uad00\ub9ac\ud558\uace0, \ub370\uc774\ud130\ub97c \ud6a8\uc728\uc801\uc73c\ub85c \uacb0\ud569\ud574\uc57c \ud569\ub2c8\ub2e4.<\/li>\n\n\n\n<li><strong>\ucd94\uac00\uc801\uc778 \ub124\ud2b8\uc6cc\ud06c \ud638\ucd9c<\/strong>: \uac8c\uc774\ud2b8\uc6e8\uc774\uac00 \uac01 \uc11c\ube0c\uadf8\ub798\ud504\uc5d0 \ucffc\ub9ac\ub97c \uc804\ub2ec\ud558\uace0 \ub370\uc774\ud130\ub97c \ubaa8\uc73c\ub294 \uacfc\uc815\uc5d0\uc11c \ub124\ud2b8\uc6cc\ud06c \ud638\ucd9c\uc774 \uc99d\uac00\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc774\ub294 \uc131\ub2a5\uc5d0 \uc601\ud5a5\uc744 \uc904 \uc218 \uc788\uc73c\ubbc0\ub85c \ucd5c\uc801\ud654\uac00 \ud544\uc694\ud569\ub2c8\ub2e4.<\/li>\n\n\n\n<li><strong>\ucd94\uac00\uc801\uc778 \uc778\ud504\ub77c \uad00\ub9ac<\/strong>: \uac8c\uc774\ud2b8\uc6e8\uc774\uc640 \uac01 \uc11c\ube0c\uadf8\ub798\ud504\ub97c \ubc30\ud3ec\ud558\uace0 \ubaa8\ub2c8\ud130\ub9c1\ud558\ub294 \ucd94\uac00\uc801\uc778 \uc778\ud504\ub77c \uad00\ub9ac\uac00 \ud544\uc694\ud569\ub2c8\ub2e4.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\uacb0\ub860<\/strong><\/h3>\n\n\n\n<p><strong>GraphQL Federation<\/strong>\uc740 \uc5ec\ub7ec \ub9c8\uc774\ud06c\ub85c\uc11c\ube44\uc2a4\ub97c \ud1b5\ud569\ud558\uc5ec \ud558\ub098\uc758 \uc77c\uad00\ub41c GraphQL API\ub97c \uc81c\uacf5\ud560 \uc218 \uc788\ub294 \uac15\ub825\ud55c \uc544\ud0a4\ud14d\ucc98 \ud328\ud134\uc785\ub2c8\ub2e4. \ud2b9\ud788 \ub300\uaddc\ubaa8 \uc2dc\uc2a4\ud15c\uc5d0\uc11c \uc11c\ube44\uc2a4 \uac04\uc758 \uc758\uc874\uc131\uc744 \uc904\uc774\uace0, \ub3c5\ub9bd\uc801\uc73c\ub85c \uac1c\ubc1c \ubc0f \ubc30\ud3ec\ud560 \uc218 \uc788\ub294 \ud658\uacbd\uc744 \uc81c\uacf5\ud569\ub2c8\ub2e4.<\/p>\n\n\n\n<p>Federation\uc744 \ud6a8\uacfc\uc801\uc73c\ub85c \uc0ac\uc6a9\ud558\ub824\uba74 \uac01 \uc11c\ube0c\uadf8\ub798\ud504 \uac04\uc758 \uad00\uacc4\ub97c \uba85\ud655\ud558\uac8c \uc815\uc758\ud558\uace0, \uac8c\uc774\ud2b8\uc6e8\uc774\ub97c \ud1b5\ud574 \ud1b5\ud569\ub41c \ub370\uc774\ud130 \ud750\ub984\uc744 \uad00\ub9ac\ud574\uc57c \ud569\ub2c8\ub2e4.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>GraphQL Federation\uc740 \uc5ec\ub7ec \uac1c\uc758 \ub9c8\uc774\ud06c\ub85c\uc11c\ube44\uc2a4\uc5d0\uc11c \uc81c\uacf5\ud558\ub294 \uc5ec\ub7ec \uac1c\uc758 GraphQL API\ub97c \ud558\ub098\uc758 \ud1b5\ud569\ub41c \uadf8\ub798\ud504\ucc98\ub7fc \uc0ac\uc6a9\ud560 \uc218 \uc788\uac8c \ud574\uc8fc\ub294 \uc544\ud0a4\ud14d\ucc98 \ud328\ud134\uc785\ub2c8\ub2e4. \uc774\ub97c \ud1b5\ud574 \ub300\uaddc\ubaa8 \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc5d0\uc11c \uc11c\ube44\uc2a4 \uac04 \ubd84\ub9ac\uc640 \ub370\uc774\ud130 \ud1b5\ud569\uc744 \uc720\uc5f0\ud558\uac8c \ucc98\ub9ac\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. Apollo Federation\uc774 \ub300\ud45c\uc801\uc778 \ub3c4\uad6c\uc774\uba70, \uc8fc\ub85c \ub300\uaddc\ubaa8 \ub9c8\uc774\ud06c\ub85c\uc11c\ube44\uc2a4 \uc544\ud0a4\ud14d\ucc98\uc5d0\uc11c GraphQL API\ub97c \ud1b5\ud569\ud560 \ub54c \uc0ac\uc6a9\ub429\ub2c8\ub2e4. 1. Federation\uc774 \ud544\uc694\ud55c \uc774\uc720 \uc804\ud1b5\uc801\uc778 GraphQL \uc11c\ubc84\uc5d0\uc11c\ub294 \ud558\ub098\uc758 \uc11c\ubc84\uc5d0\uc11c \ubaa8\ub4e0 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[55],"tags":[],"class_list":["post-2010","post","type-post","status-publish","format-standard","hentry","category-coding"],"_links":{"self":[{"href":"https:\/\/hyunsu.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2010","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hyunsu.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hyunsu.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hyunsu.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hyunsu.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2010"}],"version-history":[{"count":1,"href":"https:\/\/hyunsu.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2010\/revisions"}],"predecessor-version":[{"id":2011,"href":"https:\/\/hyunsu.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2010\/revisions\/2011"}],"wp:attachment":[{"href":"https:\/\/hyunsu.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2010"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hyunsu.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2010"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hyunsu.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2010"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}