File tree Expand file tree Collapse file tree 1 file changed +38
-35
lines changed Expand file tree Collapse file tree 1 file changed +38
-35
lines changed Original file line number Diff line number Diff line change @@ -67,46 +67,49 @@ The federation process involves several key components:
6767
6868<Tabs items = { [' Products subgraph' , ' Orders subgraph' , ' Users subgraph' ]} >
6969<Tabs.Tab >
70+
7071``` graphql
71- type Product @key (fields : " id" ) {
72- id : ID !
73- title : String !
74- price : Float !
75- inStock : Boolean !
76- }
77- ```
72+ type Product @key (fields : " id" ) {
73+ id : ID !
74+ title : String !
75+ price : Float !
76+ inStock : Boolean !
77+ }
78+ ```
79+
7880</Tabs .Tab >
7981<Tabs .Tab >
82+
8083```graphql
8184type Order @key (fields : " id" ) {
82- id : ID !
83- products : [Product ! ]!
84- total : Float !
85+ id : ID !
86+ products : [Product ! ]!
87+ total : Float !
8588}
8689
87- type Product {
88- id : ID !
89- }
90- ```
90+ type Product {
91+ id : ID !
92+ }
93+ ```
9194
9295</Tabs .Tab >
9396<Tabs .Tab >
9497```graphql
9598type Query {
96- user (id : ID ! ): User
99+ user (id : ID ! ): User
97100}
98101
99- type User {
100- id : ID !
101- name : String !
102- email : String
103- orders : [Order ! ]!
104- }
102+ type User {
103+ id : ID !
104+ name : String !
105+ email : String
106+ orders : [Order ! ]!
107+ }
105108
106- type Order {
107- id : ID !
108- }
109- ```
109+ type Order {
110+ id : ID !
111+ }
112+ ```
110113
111114</Tabs .Tab >
112115</Tabs >
@@ -156,16 +159,16 @@ often provides caching and performance optimizations.
156159
157160```mermaid
158161graph TD
159- Client --> FederationGateway
160- FederationGateway --> UserService
161- FederationGateway --> OrderService
162- FederationGateway --> ProductService
163-
164- Client[Client]
165- FederationGateway[Gateway]
166- UserService[User Service]
167- OrderService[Order Service]
168- ProductService[Product Service]
162+ Client --> FederationGateway
163+ FederationGateway --> UsersService
164+ FederationGateway --> OrdersService
165+ FederationGateway --> ProductsService
166+
167+ Client[Client]
168+ FederationGateway[Gateway]
169+ UsersService[Users Service]
170+ OrdersService[Orders Service]
171+ ProductsService[Products Service]
169172```
170173
171174Take the following query as an example:
You can’t perform that action at this time.
0 commit comments