Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions formatTest/typeCheckedTests/input/graphql.re
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/* TODO: add types for queries below here */

/**
* - the queries should type check against normal types.
* - but should also result in well-formed strings
* - bummer: we must supply the type of fields
*/

query basic => {
hero {
name: string
},
droid {
name: string
}
};

query nested => {
nested1 {
nestedB {
title: string
}
},
nested2 {
nestedC {
id: int
}
}
};

query listTest => {
test {
listTest: list string
}
};

query alias => {
something : foo {
title: string
}
};

query optionTest => {
foo2 {
x: option string
}
};

query arguments a b => {
args (a, b: b, c: 1, d: "else", x: 1) {
z: string
}
};

/*
TODO:
- fragments
- inline fragments
*/
1 change: 1 addition & 0 deletions src/reason_lexer.mll
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ let keyword_table =
"or", OR;
(* "parser", PARSER; *)
"private", PRIVATE;
"query", QUERY;
"rec", REC;
"sig", SIG;
"struct", STRUCT;
Expand Down
Loading