(className, headers)
| 6350 | await parseGraphQLServer.parseGraphQLSchema.schemaCache.clear(); |
| 6351 | |
| 6352 | async function createObject(className, headers) { |
| 6353 | const getClassName = className.charAt(0).toLowerCase() + className.slice(1); |
| 6354 | const result = await apolloClient.mutate({ |
| 6355 | mutation: gql` |
| 6356 | mutation CreateSomeObject { |
| 6357 | create${className}(input: {}) { |
| 6358 | ${getClassName} { |
| 6359 | id |
| 6360 | createdAt |
| 6361 | } |
| 6362 | } |
| 6363 | } |
| 6364 | `, |
| 6365 | context: { |
| 6366 | headers, |
| 6367 | }, |
| 6368 | }); |
| 6369 | |
| 6370 | const specificCreate = result.data[`create${className}`][getClassName]; |
| 6371 | expect(specificCreate.id).toBeDefined(); |
| 6372 | expect(specificCreate.createdAt).toBeDefined(); |
| 6373 | |
| 6374 | return result; |
| 6375 | } |
| 6376 | |
| 6377 | await expectAsync(createObject('GraphQLClass')).toBeRejectedWith( |
| 6378 | jasmine.stringMatching('Permission denied') |
no outgoing calls
no test coverage detected
searching dependent graphs…