Crates.io | derive-id |
lib.rs | derive-id |
version | 0.2.0 |
source | src |
created_at | 2021-06-11 04:43:05.892003 |
updated_at | 2023-03-14 10:27:36.339593 |
description | Simple NewType ID's specifically tailored to integrate with Async GraphQL and Diesel |
homepage | |
repository | |
max_upload_size | |
id | 408840 |
size | 4,694 |
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);
}