Skip to content

Commit 06adda2

Browse files
committed
running
1 parent 3961a6f commit 06adda2

File tree

2 files changed

+73
-53
lines changed

2 files changed

+73
-53
lines changed
Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1-
FROM inigohub/gateway:v0.30.13
1+
# we need curl to perform health checks
2+
# and that's why we start with alpine image
3+
# and copy the gateway binary from the original docker image
4+
FROM alpine:3.19
5+
RUN apk add --no-cache curl
6+
7+
COPY --from=inigohub/gateway:v0.30.13 /usr/bin/gateway .
28

39
COPY supergraph.graphql ./
410
COPY config.yaml ./
511

612
EXPOSE 4000
713

8-
CMD ["--schema", "supergraph.graphql", "--config", "config.yaml"]
14+
CMD ["./gateway", "--schema", "supergraph.graphql", "--config", "config.yaml"]
Lines changed: 65 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,103 @@
1+
# Generated by Inigo CLI
2+
13
schema
2-
@link(url: "https://specs.apollo.dev/link/v1.0")
3-
@link(url: "https://specs.apollo.dev/join/v0.3", for: EXECUTION)
4-
{
4+
@link(for: EXECUTION, url: "https://specs.apollo.dev/join/v0.2")
5+
@link(url: "https://specs.apollo.dev/link/v1.0") {
56
query: Query
67
}
78

8-
directive @join__enumValue(graph: join__Graph!) repeatable on ENUM_VALUE
9-
10-
directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION
11-
12-
directive @join__graph(name: String!, url: String!) on ENUM_VALUE
13-
14-
directive @join__implements(graph: join__Graph!, interface: String!) repeatable on OBJECT | INTERFACE
15-
16-
directive @join__type(graph: join__Graph!, key: join__FieldSet, extension: Boolean! = false, resolvable: Boolean! = true, isInterfaceObject: Boolean! = false) repeatable on OBJECT | INTERFACE | UNION | ENUM | INPUT_OBJECT | SCALAR
17-
18-
directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on UNION
19-
20-
directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA
21-
229
scalar join__FieldSet
10+
scalar link__Import
2311

2412
enum join__Graph {
2513
ACCOUNTS @join__graph(name: "accounts", url: "http://accounts:4001/graphql")
26-
INVENTORY @join__graph(name: "inventory", url: "http://inventory:4002/graphql")
14+
INVENTORY
15+
@join__graph(name: "inventory", url: "http://inventory:4002/graphql")
2716
PRODUCTS @join__graph(name: "products", url: "http://products:4003/graphql")
2817
REVIEWS @join__graph(name: "reviews", url: "http://reviews:4004/graphql")
2918
}
30-
31-
scalar link__Import
32-
3319
enum link__Purpose {
34-
"""
35-
`SECURITY` features provide metadata necessary to securely resolve fields.
36-
"""
37-
SECURITY
38-
3920
"""
4021
`EXECUTION` features provide metadata necessary for operation execution.
4122
"""
4223
EXECUTION
24+
"""
25+
`SECURITY` features provide metadata necessary to securely resolve fields.
26+
"""
27+
SECURITY
4328
}
4429

4530
type Product
46-
@join__type(graph: INVENTORY, key: "upc")
47-
@join__type(graph: PRODUCTS, key: "upc")
48-
@join__type(graph: REVIEWS, key: "upc")
49-
{
50-
upc: String!
51-
weight: Int @join__field(graph: INVENTORY, external: true) @join__field(graph: PRODUCTS)
52-
price: Int @join__field(graph: INVENTORY, external: true) @join__field(graph: PRODUCTS)
31+
@join__type(extension: true, graph: INVENTORY, key: "upc")
32+
@join__type(extension: true, graph: REVIEWS, key: "upc")
33+
@join__type(graph: PRODUCTS, key: "upc") {
5334
inStock: Boolean @join__field(graph: INVENTORY)
54-
shippingEstimate: Int @join__field(graph: INVENTORY, requires: "price weight")
5535
name: String @join__field(graph: PRODUCTS)
36+
price: Int
37+
@join__field(external: true, graph: INVENTORY)
38+
@join__field(graph: PRODUCTS)
5639
reviews: [Review] @join__field(graph: REVIEWS)
40+
shippingEstimate: Int @join__field(graph: INVENTORY, requires: "price weight")
41+
upc: String!
42+
weight: Int
43+
@join__field(external: true, graph: INVENTORY)
44+
@join__field(graph: PRODUCTS)
5745
}
58-
5946
type Query
6047
@join__type(graph: ACCOUNTS)
6148
@join__type(graph: INVENTORY)
6249
@join__type(graph: PRODUCTS)
63-
@join__type(graph: REVIEWS)
64-
{
50+
@join__type(graph: REVIEWS) {
6551
me: User @join__field(graph: ACCOUNTS)
52+
topProducts(first: Int = 5): [Product] @join__field(graph: PRODUCTS)
6653
user(id: ID!): User @join__field(graph: ACCOUNTS)
6754
users: [User] @join__field(graph: ACCOUNTS)
68-
topProducts(first: Int = 5): [Product] @join__field(graph: PRODUCTS)
6955
}
70-
71-
type Review
72-
@join__type(graph: REVIEWS, key: "id")
73-
{
74-
id: ID!
56+
type Review @join__type(graph: REVIEWS, key: "id") {
57+
author: User @join__field(graph: REVIEWS, provides: "username")
7558
body: String
59+
id: ID!
7660
product: Product
77-
author: User @join__field(graph: REVIEWS, provides: "username")
7861
}
79-
8062
type User
81-
@join__type(graph: ACCOUNTS, key: "id")
82-
@join__type(graph: REVIEWS, key: "id")
83-
{
63+
@join__type(extension: true, graph: REVIEWS, key: "id")
64+
@join__type(graph: ACCOUNTS, key: "id") {
65+
birthday: Int @join__field(graph: ACCOUNTS)
8466
id: ID!
8567
name: String @join__field(graph: ACCOUNTS)
86-
username: String @join__field(graph: ACCOUNTS) @join__field(graph: REVIEWS, external: true)
87-
birthday: Int @join__field(graph: ACCOUNTS)
8868
reviews: [Review] @join__field(graph: REVIEWS)
89-
}
69+
username: String
70+
@join__field(external: true, graph: REVIEWS)
71+
@join__field(graph: ACCOUNTS)
72+
}
73+
74+
directive @join__field(
75+
external: Boolean
76+
graph: join__Graph!
77+
override: String
78+
provides: join__FieldSet
79+
requires: join__FieldSet
80+
type: String
81+
usedOverridden: Boolean
82+
) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION
83+
84+
directive @join__graph(name: String!, url: String!) on ENUM_VALUE
85+
86+
directive @join__implements(
87+
graph: join__Graph!
88+
interface: String!
89+
) repeatable on OBJECT | INTERFACE
90+
91+
directive @join__type(
92+
extension: Boolean! = false
93+
graph: join__Graph!
94+
key: join__FieldSet
95+
resolvable: Boolean! = true
96+
) repeatable on OBJECT | INTERFACE | UNION | ENUM | INPUT_OBJECT | SCALAR
97+
98+
directive @link(
99+
as: String
100+
for: link__Purpose
101+
import: [link__Import]
102+
url: String
103+
) repeatable on SCHEMA

0 commit comments

Comments
 (0)