-
Notifications
You must be signed in to change notification settings - Fork 0
/
_schema.graphql
172 lines (146 loc) · 2.98 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
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
"""
A value that can differ per user
"""
type FeatureFlag {
"""
A user facing name
"""
name: String!
"""
The value used when referencing the flag in code
"""
key: String!
"""
Automatically generated ID
"""
id: ID!
"""
Derived from the start date and end date
"""
active: Boolean!
"""
ISO6801 string representing the start date of a feature
"""
startDate: String
"""
ISO6801 string representing the end date of a feature
"""
endDate: String
"""
The set of string values it could be
"""
values: [String!]!
"""
An optional list of 0-100, of the same size of values
that add up to 100, which indicate the chances of arriving at a value
"""
percents: [Int!]
"""
a Google Analytics dimension. You can create one by logging into GA, clicking 'Admin', clicking 'Custom Definitions'
in the middle column, clicking 'Custom Dimensions'. From there you can create a new custom dimension. Note that
you should then name this 'dimension1', 'dimension2', etc. - corresponding to
the index of the custom definition in this UI.
TODO: What should this look like with segment?
"""
dimension: String
"""
The option that admins will default to
"""
edge: String
"""
An option that non-logged in user will default to
"""
controlGroup: String
}
type Mutation {
"""
Create a site feature
"""
createSiteFeature(
name: String!
key: String!
startDate: String!
endDate: String
): OperationFeature
"""
Update metadata on a site feature
"""
updateSiteFeature(input: UpdateSiteFeature): OperationFeature
"""
Add a feature flag
"""
createFeatureFlag(
name: String!
key: String!
startDate: String!
endDate: String
): FeatureFlag
"""
Update metadata on a site feature
"""
updateFeatureFlag(input: UpdateFeatureFlag): FeatureFlag
}
"""
A boolean that when set is applied to every user
across the Artsy ecosystem
"""
type OperationFeature {
"""
A user facing name
"""
name: String!
"""
The value used when referencing the flag in code
"""
key: String!
"""
Automatically generated ID
"""
id: ID!
"""
Whether it is on or off for everyone
"""
value: Boolean!
"""
Derived from the start date and end date
"""
active: Boolean!
"""
ISO6801 string representing the start date of a feature
"""
startDate: String
"""
ISO6801 string representing the end date of a feature
"""
endDate: String
}
"""
Root queries that are available
"""
type Query {
"""
All current site features
"""
siteFeatures(active: Boolean): [OperationFeature!]!
"""
The feature flags for a specific user
"""
featureFlags(userID: ID!): [FeatureFlag!]!
}
input UpdateFeatureFlag {
name: String
startDate: String
endDate: String
key: String
values: [String!]
percents: [Int!]
dimension: String
edge: String
controlGroup: String
}
input UpdateSiteFeature {
name: String
startDate: String
endDate: String
key: String
}