Macro cynic::impl_scalar[][src]

macro_rules! impl_scalar {
    ($type : path, $type_lock : path) => { ... };
}
Expand description

Implements [cynic::Scalar] for a given type & type lock.

For example, to use uuid::Uuid for a Uuid type defined in a schema:

impl_scalar!(uuid::Uuid, schema::Uuid);

This macro can be used on any type that implements serde::Serialize, provided the schema is defined in the current crate