Skip to content

Commit

Permalink
feat(schema-ast): log interface
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonkuhrt committed Dec 20, 2018
1 parent a784f31 commit f302f81
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions schema-ast/main.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,11 @@ type Human {
b: [String]!
c: [String!]!
}

interface I {
a: String
}

type Query {
foobar: I
}
4 changes: 4 additions & 0 deletions schema-ast/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@ const ast = GQL.buildASTSchema(GQL.parse(sdl))
log.success("parse into AST\n\n%s\n", inspect(ast))

log.success("Human\n\n%s\n", inspect(ast.getType("Human").astNode))

log.success("Query\n\n%s\n", inspect(ast.getQueryType().astNode))

log.success("I\n\n%s\n", inspect(ast.getType("I").astNode))

0 comments on commit f302f81

Please sign in to comment.