forked from fantapop/prisma-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.graphql
66 lines (55 loc) · 1.31 KB
/
schema.graphql
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
### This file was generated by Nexus Schema
### Do not make changes to this file directly
"""
A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the `date-time` format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar.
"""
scalar DateTime
type Mutation {
createDraft(authorEmail: String!, data: PostCreateInput!): Post
deletePost(id: Int!): Post
incrementPostViewCount(id: Int!): Post
signupUser(data: UserCreateInput!): User!
togglePublishPost(id: Int!): Post
}
type Post {
author: User
content: String
createdAt: DateTime!
id: Int!
published: Boolean!
title: String!
updatedAt: DateTime!
viewCount: Int!
}
input PostCreateInput {
content: String
title: String!
}
input PostOrderByUpdatedAtInput {
updatedAt: SortOrder!
}
type Query {
allUsers: [User!]!
draftsByUser(userUniqueInput: UserUniqueInput!): [Post]
feed(orderBy: PostOrderByUpdatedAtInput, searchString: String, skip: Int, take: Int): [Post!]!
postById(id: Int): Post
}
enum SortOrder {
asc
desc
}
type User {
email: String!
id: Int!
name: String
posts: [Post!]!
}
input UserCreateInput {
email: String!
name: String
posts: [PostCreateInput!]
}
input UserUniqueInput {
email: String
id: Int
}