File: README.md

package info (click to toggle)
golang-github-graph-gophers-graphql-go 1.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,452 kB
  • sloc: sh: 373; javascript: 21; makefile: 5
file content (35 lines) | stat: -rw-r--r-- 585 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Apollo Federation

A basic example of integration with apollo federation as subgraph. Tested with Go v1.18, Node.js v16.14.2 and yarn 1.22.18.

To run this server

`go run ./example/apollo-federation/subgraph-one/server.go`

`go run ./example/apollo-federation/subgraph-two/server.go`

`cd example/apollo-federation/gateway`

`yarn start`

and go to localhost:4000 to interact

Execute the query:

```
query {
  hello
  hi
}
```

and you should see a result similar to this:

```json
{
  "data": {
    "hello": "Hello from subgraph one!",
    "hi": "Hi from subgraph two!"
  }
}
```