1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
"""A minimal schema for trying gqls: gqls user examples/schema.graphql"""
type Query {
"""Look up a user by id."""
user(id: ID!): User
users(first: Int, after: String): [User!]!
search(term: String!): [SearchResult!]!
}
type Mutation {
createUser(input: CreateUserInput!): User!
deleteUser(id: ID!): Boolean! @deprecated(reason: "use archiveUser")
}
"""An account."""
type User {
id: ID!
name: String!
email: String!
role: Role!
posts(first: Int): [Post!]!
}
type Post {
id: ID!
title: String!
author: User!
}
union SearchResult = User | Post
enum Role {
ADMIN
MEMBER
GUEST
}
input CreateUserInput {
name: String!
email: String!
role: Role = MEMBER
}
scalar DateTime