@@ -16,7 +16,7 @@ describe('default (data)', () => {
16
16
await expect ( client . document ( { main : { query : { id : true } } } ) . runOrThrow ( ) ) . resolves . toEqual ( { id : db . id } )
17
17
} )
18
18
test ( `document.runOrThrow error` , async ( ) => {
19
- await expect ( client . document ( { main : { query : { error : true } } } ) . runOrThrow ( ) ) . rejects . toEqual ( db . error )
19
+ await expect ( client . document ( { main : { query : { error : true } } } ) . runOrThrow ( ) ) . rejects . toEqual ( db . errorAggregate )
20
20
} )
21
21
test ( 'raw' , async ( ) => {
22
22
await expect ( client . raw ( 'query main {\nid\n}' , { } , 'main' ) ) . resolves . toEqual ( { data : { id : db . id } } )
@@ -25,16 +25,16 @@ describe('default (data)', () => {
25
25
await expect ( client . query . __typename ( ) ) . resolves . toEqual ( 'Query' )
26
26
} )
27
27
test ( 'query.<fieldMethod> error' , async ( ) => {
28
- await expect ( client . query . error ( ) ) . rejects . toMatchObject ( db . error )
28
+ await expect ( client . query . error ( ) ) . rejects . toMatchObject ( db . errorAggregate )
29
29
} )
30
30
test ( 'query.<fieldMethod> error orThrow' , async ( ) => {
31
- await expect ( client . query . errorOrThrow ( ) ) . rejects . toMatchObject ( db . error )
31
+ await expect ( client . query . errorOrThrow ( ) ) . rejects . toMatchObject ( db . errorAggregate )
32
32
} )
33
33
test ( 'query.$batch' , async ( ) => {
34
34
await expect ( client . query . $batch ( { __typename : true , id : true } ) ) . resolves . toEqual ( { __typename : 'Query' , id : db . id } )
35
35
} )
36
36
test ( 'query.$batchOrThrow error' , async ( ) => {
37
- await expect ( client . query . $batchOrThrow ( { error : true } ) ) . rejects . toMatchObject ( db . error )
37
+ await expect ( client . query . $batchOrThrow ( { error : true } ) ) . rejects . toMatchObject ( db . errorAggregate )
38
38
} )
39
39
test ( 'mutation.<fieldMethod>' , async ( ) => {
40
40
await expect ( client . mutation . __typename ( ) ) . resolves . toEqual ( 'Mutation' )
@@ -54,7 +54,7 @@ describe('dataAndErrors', () => {
54
54
await expect ( client . document ( { main : { query : { id : true } } } ) . runOrThrow ( ) ) . resolves . toEqual ( { id : db . id } )
55
55
} )
56
56
test ( `document.runOrThrow error` , async ( ) => {
57
- await expect ( client . document ( { main : { query : { error : true } } } ) . runOrThrow ( ) ) . rejects . toEqual ( db . error )
57
+ await expect ( client . document ( { main : { query : { error : true } } } ) . runOrThrow ( ) ) . rejects . toEqual ( db . errorAggregate )
58
58
} )
59
59
test ( 'raw' , async ( ) => {
60
60
await expect ( client . raw ( 'query main {\nid\n}' , { } , 'main' ) ) . resolves . toEqual ( { data : { id : db . id } } )
@@ -63,16 +63,16 @@ describe('dataAndErrors', () => {
63
63
await expect ( client . query . __typename ( ) ) . resolves . toEqual ( 'Query' )
64
64
} )
65
65
test ( 'query.<fieldMethod> error' , async ( ) => {
66
- await expect ( client . query . error ( ) ) . resolves . toMatchObject ( db . error )
66
+ await expect ( client . query . error ( ) ) . resolves . toMatchObject ( db . errorAggregate )
67
67
} )
68
68
test ( 'query.<fieldMethod> error orThrow' , async ( ) => {
69
- await expect ( client . query . errorOrThrow ( ) ) . rejects . toMatchObject ( db . error )
69
+ await expect ( client . query . errorOrThrow ( ) ) . rejects . toMatchObject ( db . errorAggregate )
70
70
} )
71
71
test ( 'query.$batch' , async ( ) => {
72
72
await expect ( client . query . $batch ( { __typename : true , id : true } ) ) . resolves . toEqual ( { __typename : 'Query' , id : db . id } )
73
73
} )
74
74
test ( 'query.$batchOrThrow error' , async ( ) => {
75
- await expect ( client . query . $batchOrThrow ( { error : true } ) ) . rejects . toMatchObject ( db . error )
75
+ await expect ( client . query . $batchOrThrow ( { error : true } ) ) . rejects . toMatchObject ( db . errorAggregate )
76
76
} )
77
77
test ( 'mutation.<fieldMethod>' , async ( ) => {
78
78
await expect ( client . mutation . __typename ( ) ) . resolves . toEqual ( 'Mutation' )
@@ -146,7 +146,7 @@ describe('graphql', () => {
146
146
await expect ( client . document ( { main : { query : { id : true } } } ) . runOrThrow ( ) ) . resolves . toEqual ( { data :{ id : db . id } } )
147
147
} )
148
148
test ( `document.runOrThrow error` , async ( ) => {
149
- await expect ( client . document ( { main : { query : { error : true } } } ) . runOrThrow ( ) ) . rejects . toEqual ( db . error )
149
+ await expect ( client . document ( { main : { query : { error : true } } } ) . runOrThrow ( ) ) . rejects . toEqual ( db . errorAggregate )
150
150
} )
151
151
test ( 'raw' , async ( ) => {
152
152
await expect ( client . raw ( 'query main {\nid\n}' , { } , 'main' ) ) . resolves . toEqual ( { data : { id : db . id } } )
@@ -155,16 +155,16 @@ describe('graphql', () => {
155
155
await expect ( client . query . __typename ( ) ) . resolves . toEqual ( { data : { __typename : 'Query' } } )
156
156
} )
157
157
test ( 'query.<fieldMethod> error' , async ( ) => {
158
- await expect ( client . query . error ( ) ) . resolves . toMatchObject ( { errors :db . error [ 'errors' ] } )
158
+ await expect ( client . query . error ( ) ) . resolves . toMatchObject ( { errors :db . errorAggregate [ 'errors' ] } )
159
159
} )
160
160
test ( 'query.<fieldMethod> orThrow error' , async ( ) => {
161
- await expect ( client . query . errorOrThrow ( ) ) . rejects . toMatchObject ( db . error )
161
+ await expect ( client . query . errorOrThrow ( ) ) . rejects . toMatchObject ( db . errorAggregate )
162
162
} )
163
163
test ( 'query.$batch' , async ( ) => {
164
164
await expect ( client . query . $batch ( { __typename : true , id : true } ) ) . resolves . toEqual ( { data : { __typename : 'Query' , id : db . id } } )
165
165
} )
166
166
test ( 'query.$batchOrThrow error' , async ( ) => {
167
- await expect ( client . query . $batchOrThrow ( { error : true } ) ) . rejects . toMatchObject ( db . error )
167
+ await expect ( client . query . $batchOrThrow ( { error : true } ) ) . rejects . toMatchObject ( db . errorAggregate )
168
168
} )
169
169
test ( 'mutation.<fieldMethod>' , async ( ) => {
170
170
await expect ( client . mutation . __typename ( ) ) . resolves . toEqual ( { data : { __typename : 'Mutation' } } )
0 commit comments