
Building developer tooling for iOS at @apollographql. All opinions are my own.
- Tweets330
- Following109
- Followers88
- Likes157

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 "# } );














