Skip to content

Commit d152bda

Browse files
authored
chore(tests): mirror types table in types tests (#677)
1 parent 5cd51b6 commit d152bda

4 files changed

Lines changed: 1478 additions & 8 deletions

File tree

packages/postgraphile-core/__tests__/fixtures/mutations/types.graphql

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,15 @@ fragment compoundType on CompoundType {
147147
fooBar
148148
}
149149

150+
# This should be the same fragment as in queries/types.graphql
150151
fragment type on Type {
151152
id
152153
smallint
153154
bigint
155+
numeric
156+
decimal
154157
boolean
158+
varchar
155159
enum
156160
enumArray
157161
domain
@@ -179,6 +183,16 @@ fragment type on Type {
179183
inclusive
180184
}
181185
}
186+
daterange {
187+
start {
188+
value
189+
inclusive
190+
}
191+
end {
192+
value
193+
inclusive
194+
}
195+
}
182196
anIntRange {
183197
start {
184198
value
@@ -189,6 +203,27 @@ fragment type on Type {
189203
inclusive
190204
}
191205
}
206+
timestamp
207+
timestamptz
208+
date
209+
time
210+
timetz
211+
interval {
212+
years
213+
months
214+
days
215+
hours
216+
minutes
217+
seconds
218+
}
219+
intervalArray {
220+
years
221+
months
222+
days
223+
hours
224+
minutes
225+
seconds
226+
}
192227
money
193228
compoundType {
194229
...compoundType
@@ -235,4 +270,12 @@ fragment type on Type {
235270
regdictionary
236271
textArrayDomain
237272
int8ArrayDomain
273+
postBySmallint {
274+
id
275+
headline
276+
}
277+
postById {
278+
id
279+
headline
280+
}
238281
}

packages/postgraphile-core/__tests__/fixtures/queries/types.graphql

Lines changed: 43 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,15 @@ fragment compoundType on CompoundType {
5656
fooBar
5757
}
5858

59+
# This should be the same fragment as in mutations/types.graphql
5960
fragment type on Type {
6061
id
6162
smallint
6263
bigint
64+
numeric
65+
decimal
6366
boolean
67+
varchar
6468
enum
6569
enumArray
6670
domain
@@ -88,6 +92,16 @@ fragment type on Type {
8892
inclusive
8993
}
9094
}
95+
daterange {
96+
start {
97+
value
98+
inclusive
99+
}
100+
end {
101+
value
102+
inclusive
103+
}
104+
}
91105
anIntRange {
92106
start {
93107
value
@@ -98,6 +112,27 @@ fragment type on Type {
98112
inclusive
99113
}
100114
}
115+
timestamp
116+
timestamptz
117+
date
118+
time
119+
timetz
120+
interval {
121+
years
122+
months
123+
days
124+
hours
125+
minutes
126+
seconds
127+
}
128+
intervalArray {
129+
years
130+
months
131+
days
132+
hours
133+
minutes
134+
seconds
135+
}
101136
money
102137
compoundType {
103138
...compoundType
@@ -134,6 +169,14 @@ fragment type on Type {
134169
inet
135170
cidr
136171
macaddr
172+
regproc
173+
regprocedure
174+
regoper
175+
regoperator
176+
regclass
177+
regtype
178+
regconfig
179+
regdictionary
137180
textArrayDomain
138181
int8ArrayDomain
139182
postBySmallint {
@@ -144,14 +187,6 @@ fragment type on Type {
144187
id
145188
headline
146189
}
147-
regproc
148-
regprocedure
149-
regoper
150-
regoperator
151-
regclass
152-
regtype
153-
regconfig
154-
regdictionary
155190
}
156191

157192
fragment typesConnection on TypesConnection {

0 commit comments

Comments
 (0)