Files
genqlient/generate/testdata/queries/schema.graphql
T
Ben Kraft 32fea7fae4 fix incorrect enum-value type names for enums used as inputs
luckily webapp is now a much more complete test suite and genqlient's
own tests, so it caught this!
2021-04-21 17:41:33 -07:00

78 lines
1.2 KiB
GraphQL

scalar DateTime
scalar Junk
scalar ComplexJunk
enum Role {
STUDENT
TEACHER
}
input UserQueryInput {
email: String
name: String
id: ID
role: Role
names: [String]
}
type AuthMethod {
provider: String
email: String
}
type User {
id: ID!
roles: [Role!]
name: String
emails: [String!]!
emailsOrNull: [String!]
emailsWithNulls: [String]!
emailsWithNullsOrNull: [String]
authMethods: [AuthMethod!]!
}
interface Content {
id: ID!
name: String!
parent: Topic
}
union LeafContent = Article | Video
type Article implements Content {
id: ID!
name: String!
parent: Topic!
text: String!
}
type Video implements Content {
id: ID!
name: String!
parent: Topic!
duration: Int!
}
type Topic implements Content {
id: ID!
name: String!
parent: Topic
children: [Content!]!
}
type Query {
user(query: UserQueryInput): User
usersWithRole(role: Role!): [User!]!
root: Topic!
randomLeaf: LeafContent!
convert(dt: DateTime!, tz: String): DateTime!
maybeConvert(dt: DateTime, tz: String): DateTime
getJunk: Junk
getComplexJunk: ComplexJunk
listOfListsOfLists: [[[String!]!]!]!
}
type Mutation {
createUser(name: String!, email: String): User
}