2022-10-28 12:42:05 +00:00
|
|
|
# Simple starter for WunderGraph Cloud
|
|
|
|
|
2022-12-02 11:24:48 +00:00
|
|
|
A simple starter that consumes the [GraphQL SpaceX API](https://spacex-api.fly.dev/graphql/).
|
2022-10-28 12:42:05 +00:00
|
|
|
|
|
|
|
### Getting started locally
|
|
|
|
|
|
|
|
```shell
|
|
|
|
npm install && npm start
|
|
|
|
```
|
|
|
|
|
2022-12-02 11:24:48 +00:00
|
|
|
Get SpaceX Dragons
|
2022-10-28 12:42:05 +00:00
|
|
|
|
|
|
|
```shell
|
2022-12-02 11:24:48 +00:00
|
|
|
curl -X GET http://localhost:9991/operations/Dragons
|
2022-10-28 12:42:05 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
---
|
|
|
|
|
2022-12-02 11:24:48 +00:00
|
|
|
### Deploy to WunderGraph Cloud
|
2022-10-28 12:42:05 +00:00
|
|
|
|
|
|
|
1. Fork this repo
|
|
|
|
2. Sign in to [WunderGraph Cloud](https://cloud.wundergraph.com)
|
|
|
|
3. Create a new project
|
|
|
|
4. Import the forked repo
|
|
|
|
5. Deploy the project
|
|
|
|
|
2022-11-02 17:49:31 +00:00
|
|
|
Try it out (replace `YOUR_PROJECT_ID` with your project id):
|
|
|
|
|
|
|
|
```shell
|
2022-12-02 11:24:48 +00:00
|
|
|
curl -X GET https://{YOUR_PROJECT_NAME}.wundergraph.dev/operations/Dragons
|
2022-11-02 17:49:31 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
### Make changes
|
|
|
|
|
2022-12-02 11:24:48 +00:00
|
|
|
1. Make changes to the `main` branch, e.g. change the query in `.wundergraph/operations/Dragons.graphql`
|
2022-11-02 17:49:31 +00:00
|
|
|
2. Commit and push the changes
|
|
|
|
|
|
|
|
See your changes live in less than 20 seconds.
|
|
|
|
|
|
|
|
```shell
|
2022-12-02 11:24:48 +00:00
|
|
|
curl -X GET https://{YOUR_PROJECT_NAME}.wundergraph.dev/operations/Dragons
|
2022-11-02 17:49:31 +00:00
|
|
|
```
|
|
|
|
|
2022-10-28 12:42:05 +00:00
|
|
|
---
|
2022-12-02 11:24:48 +00:00
|
|
|
|
2022-10-28 12:42:05 +00:00
|
|
|
### Learn More
|
|
|
|
|
|
|
|
Read the [Docs](https://wundergraph.com/docs).
|