Created
April 23, 2018 21:05
-
-
Save lightsofapollo/99d88f72b0d58e12b895c2f01ef785c4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum UserTypes { | |
SuperUser | |
Administrator | |
Customer | |
} | |
enum Gender { | |
""" | |
Men | |
""" | |
Male | |
""" | |
Women | |
""" | |
Female | |
NonBinary | |
} | |
input Wrapper { | |
foo: String | |
} | |
input GenderInput { | |
""" | |
the check | |
""" | |
check: Boolean! | |
another: ID | |
listOfStrings: [String]! | |
nullableListOfStrings: [String] | |
wrapper: Wrapper! | |
gender: Gender | |
} | |
type User @bsRecord(type: "User.t") { | |
name: String! | |
email: String! | |
gender: Gender | |
listNullable: [String] | |
list: [String]! | |
getGender( | |
""" | |
Do the check? | |
""" | |
check: GenderInput | |
): Gender! | |
self(check: Boolean!): User! | |
} | |
type Query { | |
user: User | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type userTypes = [ | `SuperUser | `Administrator | `Customer] | |
and gender = [ | |
| `Male /* Men */ /* Women */ | |
| `Female /* Men */ /* Women */ | |
| `NonBinary /* Men */ /* Women */ | |
] | |
and wrapper = {foo: option(string)} | |
and genderInput = { | |
/* the check */ | |
check: bool, | |
another: option(string), | |
listOfStrings: array(string), | |
nullableListOfStrings: option(array(string)), | |
wrapper, | |
gender: option(gender), | |
} | |
and user = { | |
name: string, | |
email: string, | |
gender: option(gender), | |
listNullable: option(array(string)), | |
list: array(string), | |
getGender: | |
/* Do the check? */ | |
(~check: option(genderInput)=?, unit) => | |
gender, | |
self: (~check: bool, unit) => user, | |
} | |
and query = {user: option(user)}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment