Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GraphiQL documentation #162

Merged
merged 1 commit into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added docs/docs/crud/img/graphiql.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 24 additions & 4 deletions docs/docs/crud/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -157,19 +157,39 @@ web-1 | 2024-06-24 06:55:18.447:INFO :oejs.AbstractConnector:main: Started Serv
web-1 | 2024-06-24 06:55:18.459:INFO :oejs.Server:main: Started Server@71d44a3{STARTING}[11.0.15,sto=5000] @13768ms
```

:::tip

A MySQL database container has also started alongside and is accessible via

```console
`mysql -h localhost -D minerva -P 3306 --protocol=tcp -u root -proot`
mysql -h localhost -D elide -P 3306 --protocol=tcp -u root -proot
```

:::
All data is persisted in a database called __elide__

Writing Data
------------

:::tip[Installing GraphiQL]

GraphiQL offers a user-friendly UI for issuing GraphQL queries and displaying query responses. We can use it for the
API call below.

- __Mac__ uses [Homebrew](https://formulae.brew.sh/cask/graphiql)

```console
brew install --cask graphiql
```

- __Windows__ binary can be downloaded from the [release page](https://github.com/skevy/graphiql-app/releases).
Then install the downloaded `.exe` file
- __Linux__ users can follow the
[official documentation](https://github.com/skevy/graphiql-app?tab=readme-ov-file#linux-installation)

When installed, the GraphiQL user interface looks like the following:

![Error loading graphiql.png](./img/graphiql.png)

:::

### Inserting Data

We have defined our views on the database and exposed those views over HTTP. Next let's use cURL to put data in the
Expand Down
Loading