Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
muukii authored Oct 22, 2022
1 parent eecb866 commit 3193e12
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ other installation ways will be added in the future
## Overview

```sh
$ grain <File>
$ grain <template file>
```

```
Expand Down Expand Up @@ -223,6 +223,28 @@ $ grain Component.swift
}
```

### Use async/await

the template file allows writing async/await operation.
`GrainDescriptor` is including `Alamofire` as built-in.
For instance, we could create a serizalized data using networking like fetching data.

```swift
import GrainDescriptor

let response = try await AF.request("https://httpbin.org/get").serializingString().value

serialize {

GrainObject {
GrainMember("result") {
response
}
}

}
```

## Showcases

<details>
Expand Down

0 comments on commit 3193e12

Please sign in to comment.