You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"json": "{\\"message\\":\\"should be unmodified\\",\\"locations\\":[{\\"line\\":1,\\"column\\":2}],\\"path\\":[\\"fieldWhichWillError\\"],\\"extensions\\":{\\"custom\\":\\"extension\\"}}",
1353
+
"location": Array [
1354
+
Object {
1355
+
"column": 2,
1356
+
"line": 1,
1357
+
},
1358
+
],
1359
+
"message": "should be unmodified",
1360
+
},
1361
+
]
1362
+
`);
1363
+
});
1364
+
1365
+
it('masked',async()=>{
1366
+
throwError.mockImplementationOnce(()=>{
1367
+
thrownewGraphQLError('should be masked',{
1368
+
extensions: {custom: 'extension'},
1369
+
});
1370
+
});
1371
+
1372
+
awaitsetupApolloServerAndFetchPair({
1373
+
sendErrorsInTraces: {
1374
+
masked: true,
1375
+
},
1376
+
});
1377
+
1378
+
constresult=awaitapolloFetch({
1379
+
query: `{fieldWhichWillError}`,
1380
+
});
1381
+
expect(result.data).toEqual({
1382
+
fieldWhichWillError: null,
1383
+
});
1384
+
expect(result.errors).toBeDefined();
1385
+
expect(result.errors[0].message).toEqual('should be masked');
0 commit comments