#graphql #diesel #integrate #specifically #id #async #derive

derive-id

Simple NewType ID's specifically tailored to integrate with Async GraphQL and Diesel

2 unstable releases

0.2.0 Mar 14, 2023
0.1.6 Jun 11, 2021

#762 in HTTP server

Download history 4/week @ 2024-02-14 22/week @ 2024-02-21 2/week @ 2024-02-28 26/week @ 2024-03-27 27/week @ 2024-04-03

53 downloads per month

MIT license

4KB
63 lines

Derive ID

License Cargo Documentation

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–27MB
~481K SLoC