
Engineering manager at @apollographql • Previously, @meteorjs • Long-time engineer • Scamper-er/adventurer, trained in glitter and mud • He/they/hän
- Tweets764
- Following849
- Followers742
- Likes3.9K

ALT a screen shot of apollo-parser usage in a terminal-like window. Code reads: use apollo_parser::{ast, Parser}; let input = "directive @example(isTreat: Boolean, treatKind: String) on FIELD | MUTATION"; let parser = Parser::new(input); let ast = parser.parse(); let doc = ast.document(); for def in doc.definitions() { if let ast::Definition::DirectiveDefinition(directive) = def { assert_eq!( directive.name() .expect("Cannot get directive name") .text(), "example" ); } }

ALT A screenshot of apollo_encoder usage set in a terminal-like interface. The code reads: use apollo_encoder::{Schema, UnionDef}; use indoc::indoc; let mut schema = Schema::new(); let mut union_def = UnionDef::new("Cat".to_string()); union_def.description(Some( "A union of all cats represented within a household.".to_string(), )); union_def.member("NORI".to_string()); union_def.member("CHASHU".to_string()); schema.union(union_def); assert_eq!( schema.finish(), indoc! { r#" "A union of all cats represented within a household." union Cat = NORI | CHASHU "# } );




















