# typewriter-graphql
> GraphQL SDL emitter for the [typewriter](https://github.com/aarambh-darshan/typewriter) SDK.
[](https://crates.io/crates/typewriter-graphql)
[](https://docs.rs/typewriter-graphql)
## What It Generates
| `struct` | `type Name { field: Type! }` |
| Simple `enum` | `enum Name { VARIANT1 VARIANT2 }` |
| Tagged `enum` | `union Name = V1 \| V2` + individual `type` per variant |
| `Option<T>` | Nullable field (no `!` suffix) |
| `Vec<T>` | `[T!]` |
| `HashMap<K,V>` | `JSON` (custom scalar) |
| `Uuid` | `ID` |
| `DateTime<Utc>` | `DateTime` (custom scalar) |
## Example Output
```graphql
# Auto-generated by typewriter v0.4.0. DO NOT EDIT.
# Source: UserProfile
"""
A user profile in the system.
"""
type UserProfile {
""" Unique user identifier """
id: String!
email: String!
age: Int
tags: [String!]!
}
```
## Usage
Used internally by `typewriter-macros`. Most users should depend on the main [`typewriter`](https://crates.io/crates/typewriter) crate.
## License
Apache-2.0 — [Aarambh Dev Hub](https://github.com/aarambh-darshan)