Macro apollo_compiler::coord
source ยท macro_rules! coord { ( @ $name:ident ) => { ... }; ( @ $name:ident ( $arg:ident : ) ) => { ... }; ( $name:ident ) => { ... }; ( $name:ident . $attribute:ident ) => { ... }; ( $name:ident . $field:ident ( $arg:ident : ) ) => { ... }; }
Expand description
Create a static schema coordinate at compile time.
use apollo_compiler::coord;
assert_eq!(coord!(@directive).to_string(), "@directive");
assert_eq!(coord!(@directive(arg:)).to_string(), "@directive(arg:)");
assert_eq!(coord!(Type).to_string(), "Type");
assert_eq!(coord!(Type.field).to_string(), "Type.field");
assert_eq!(coord!(Type.field(arg:)).to_string(), "Type.field(arg:)");
assert_eq!(coord!(EnumType.ENUM_VALUE).to_string(), "EnumType.ENUM_VALUE");