You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<imgsrc="https://gramps-graphql.github.io/gramps-express/assets/img/gramps-banner.png"alt="GrAMPS · An easier way to manage the data sources powering your GraphQL server"width="450">
1
+
<ahref="https://gramps.js.org/"><imgsrc="https://gramps.js.org/assets/img/gramps-banner.png"alt="GrAMPS · An easier way to manage the data sources powering your GraphQL server"width="450"></a>
# IMPORTANT: Make sure to edit the name, description, contributors, and
45
42
# repository fields in package.json
46
43
47
44
# Install dependencies
48
-
yarn install
49
-
```
45
+
yarn
50
46
51
-
### To Develop with Mock Data
47
+
# Start the dev server
48
+
yarn dev
49
+
```
52
50
53
-
Start the app with the following command:
51
+
You'll see a message with URLs for the GraphQL gateway and the [GraphQL Playground](https://github.com/graphcool/graphql-playground). Open the Playground link (usually http://localhost:8080/playground if you don’t already have something running on port 8080), then run a query:
54
52
55
-
```sh
56
-
# Develop with mock data
57
-
yarn mock-data
53
+
```graphql
54
+
{
55
+
getById(id: 123) {
56
+
id
57
+
name
58
+
lucky_numbers
59
+
}
60
+
}
58
61
```
59
62
60
-
### To Develop with Live Data
63
+
### To Develop with Mock Data
61
64
62
-
Once you’ve got your data source configured to load live data, you can enable live data in development:
65
+
Start the app with the following command:
63
66
64
67
```sh
65
-
#Develop with live data
66
-
yarn live-data
68
+
#Start the gateway with mock data
69
+
yarn dev --mock
67
70
```
68
71
69
72
### Notes for Developers
70
73
71
-
Currently, there is no watch capability (PRs welcome!), so the service needs to be stopped (`control` + `C`) and restarted (`yarn [mock-data|live-data]`) to reflect new changes to the data source.
74
+
Currently, there is no watch capability (PRs welcome!), so the service needs to be stopped (`control` + `C`) and restarted (`yarn dev`) to reflect new changes to the data source.
0 commit comments