-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpart-of-speech.graphql
112 lines (87 loc) · 2.87 KB
/
part-of-speech.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
"Represents a part of speech ID."
scalar PartOfSpeechId @id
"""
A part of speech is associated with each word in the dictionary. It is possible
to search and filter definitions by part of speech, and every definition must
belong to a part of speech.
"""
type PartOfSpeech implements RecentItem {
"The globally unique ID of the part of speech."
id: PartOfSpeechId!
"The display name of the part of speech."
name: String!
"The language that the part of speech belongs to."
language: Language!
"Formatted text that provides a description of the part of speech."
description: [BlockElement!]!
"""
Indicates whether the part of speech is currently used by any definitions.
To get the definitions that use this part of speech, see the `usedByDefinitions`
field.
"""
isInUse: Boolean!
"""
Gets the definitions that use this part of speech.
Definitions are ordered by term first, by ID second. If any definitions belong
to the same lemma, they will appear in the same relative order as they would
on the `Lemma.definitions` field.
Since the part of speech may be used by many definitions, this field is always
paginated. If provided, `page.perPage` cannot exceed 200.
"""
usedByDefinitions(page: PageParams): DefinitionConnection!
"The time that the part of speech was created."
timeCreated: UtcInstant!
"The time of the most recent update to the part of speech."
timeUpdated: UtcInstant!
"Assorted statistics about a part of speech."
statistics: PartOfSpeechStats!
}
"Contains statistics about a part of speech."
type PartOfSpeechStats {
"The total number of definitions that use the part of speech."
definitionCount: Int!
}
extend type Query {
"Finds a part of speech by ID."
partOfSpeech(id: PartOfSpeechId!): PartOfSpeech
}
"Input type for a new part of speech."
input NewPartOfSpeechInput {
"The language that the part of speech will be added to."
languageId: LanguageId!
"The display name of the part of speech."
name: String!
"""
Formatted text that provides a description of the part of speech. If omitted
or null, the part of speech has no description.
"""
description: [BlockElementInput!]
}
"Input type for editing an existing part of speech."
input EditPartOfSpeechInput {
"If set, renames the part of speech."
name: String
"If set, updates the part of speech description."
description: [BlockElementInput!]
}
extend type Mutation {
"""
Adds a part of speech.
Requires authentication.
"""
addPartOfSpeech(data: NewPartOfSpeechInput!): PartOfSpeech
"""
Edits a part of speech.
Requires authentication.
"""
editPartOfSpeech(
id: PartOfSpeechId!
data: EditPartOfSpeechInput!
): PartOfSpeech
"""
Deletes a part of speech. It is not possible to delete a part of speech that
is in use by any definition.
Requires authentication.
"""
deletePartOfSpeech(id: PartOfSpeechId!): Boolean
}