Skip to content

Commit 30adebb

Browse files
author
codeliner
committed
Rm GraphQL from readme
1 parent 41d929a commit 30adebb

File tree

1 file changed

+5
-86
lines changed

1 file changed

+5
-86
lines changed

README.md

Lines changed: 5 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ Dockerized skeleton for prooph software [Event Machine](https://github.com/proop
55
Please make sure you have installed [Docker](https://docs.docker.com/engine/installation/ "Install Docker") and [Docker Compose](https://docs.docker.com/compose/install/ "Install Docker Compose").
66

77
```bash
8-
$ docker run --rm -it -v $(pwd):/app prooph/composer:7.1 create-project proophsoftware/event-machine-skeleton
9-
$ cd event-machine-skeleton
8+
$ docker run --rm -it -v $(pwd):/app prooph/composer:7.1 create-project proophsoftware/event-machine-skeleton <your_project_name>
9+
$ cd <your_project_name>
1010
$ sudo chown $(id -u -n):$(id -g -n) . -R
1111
$ docker-compose up -d
1212
$ docker-compose run php php scripts/create_event_stream.php
@@ -75,87 +75,6 @@ The easiest way is to install one of the available GraphQL clients for Google Ch
7575
Point your GraphQL client to `http://localhost:8080/api/graphql`. It should inspect the schema generated by event machine and suggest you
7676
all available commands and queries.
7777

78-
### Try It
79-
80-
Try the demo by adding a building using a GraphQL client to send requests:
81-
82-
```graphql
83-
mutation {
84-
AddBuilding(
85-
buildingId:"07e16c58-8ea7-43d5-b26c-afc002967074",
86-
name:"prooph HQ"
87-
)
88-
}
89-
90-
# Response:
91-
#
92-
# {
93-
# "data": {
94-
# "AddBuilding": true
95-
# }
96-
# }
97-
```
98-
99-
Next send a query to list all buildings (you can also filter by name and have options to skip and limit the result set):
100-
101-
```graphql
102-
query {
103-
Buildings {
104-
buildingId
105-
name
106-
users
107-
}
108-
}
109-
110-
# Response:
111-
#
112-
# {
113-
# "data": {
114-
# "Buildings": [
115-
# {
116-
# "buildingId": "07e16c58-8ea7-43d5-b26c-afc002967074",
117-
# "name": "prooph HQ",
118-
# "users": []
119-
# }
120-
# ]
121-
# }
122-
# }
123-
```
124-
125-
Now that we have a building we can check-in a user by name.
126-
127-
```graphql
128-
mutation {
129-
CheckInUser(
130-
buildingId:"07e16c58-8ea7-43d5-b26c-afc002967074",
131-
name:"John"
132-
)
133-
}
134-
135-
# Response:
136-
#
137-
# {
138-
# "data": {
139-
# "CheckInUser": true
140-
# }
141-
# }
142-
```
143-
144-
Send the previous query to list `Buildings` again. John should now be in the prooph HQ.
145-
146-
If everything worked so far you can take a look at the Postgres DB and se what we got on the persistence side.
147-
We have an event stream with two events `BuildingMgmt.BuildingAdded` and `BuildingMgmt.UserCheckedIn`.
148-
We also have a table called `em_ds_building_projection_0_1_0` that contains the added building with the checked in user John.
149-
150-
Try to check in John again and keep an eye on the JS websocket client that you can monitor in the browser: `http://localhost:8080/ws.html`
151-
152-
Our small application detects **double check in** of a user and notifies security (us monitoring the `ui-queue`).
153-
154-
### Exercise
155-
156-
Implement the `Command::CHECK_OUT_USER`. Look at the classes in `src/Api`. They contain detailed comments and should guide you
157-
to the process.
158-
15978
## Troubleshooting
16079

16180
With the command `docker-compose ps` you can list the running containers. This should look like the following list:
@@ -210,10 +129,10 @@ You can also check the projection log with:
210129
$ docker-compose logs -f event_machine_projection
211130
```
212131

213-
### GraphQL is not updated
132+
### Swagger UI is not updated
214133

215-
When you add new commands or queries in event machine the GraphQL client will not automatically reread the schema from the backend.
216-
Simply reload the GraphQL client or press `Set endpoint` button.
134+
When you add new commands or queries in event machine the Swagger UI will not automatically reread the schema from the backend.
135+
Simply reload the UI or press `Explore` button.
217136

218137

219138
## Batteries Included

0 commit comments

Comments
 (0)