2 unstable releases
0.2.0 | Mar 14, 2023 |
---|---|
0.1.6 | Jun 11, 2021 |
#1500 in HTTP server
25 downloads per month
4KB
63 lines
Derive ID
A one size fits some NewType ID derive specifically tailored to integrate with Async GraphQL and Diesel. In particular, this allows for ID types that can be used in conjunction with diesel::associations::BelongsTo
.
derive_id! {
#[derive(Identifiable)]
#[diesel(table_name = content)]
#[graphql(name = "ContentID")]
pub struct ContentId(#[diesel(column_name = "id")] i32);
}
Dependencies
~15–26MB
~473K SLoC