Skip to content

Commit 2162d40

Browse files
committed
removed the topic type from the test schema and added scalars as a query feild
1 parent 8f19ce2 commit 2162d40

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

test/analysis/typeComplexityAnalysis.test.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import getQueryTypeComplxity from '../../src/analysis/typeComplexityAnalysis';
1010
character(id: ID!): Character
1111
droid(id: ID!): Droid
1212
human(id: ID!): Human
13+
scalars: Scalars
1314
}
1415
1516
enum Episode {
@@ -62,10 +63,7 @@ import getQueryTypeComplxity from '../../src/analysis/typeComplexityAnalysis';
6263
name: String,
6364
variable: Scalars
6465
}
65-
type Topic {
66-
relatedTopics(first: Int): [Topic]
67-
name: String
68-
}
66+
6967
*
7068
* TODO: extend this schema to include mutations, subscriptions and pagination
7169
*
@@ -163,7 +161,7 @@ const typeWeights: TypeWeightObject = {
163161
},
164162
};
165163

166-
describe('Test getQueryTypeComplexity function', () => {
164+
xdescribe('Test getQueryTypeComplexity function', () => {
167165
let query = '';
168166
describe('Calculates the correct type complexity for queries', () => {
169167
beforeEach(() => {
@@ -264,7 +262,7 @@ describe('Test getQueryTypeComplexity function', () => {
264262
Query {
265263
human(id: 1) {
266264
name,
267-
friends(first: 5) {
265+
friends {
268266
name
269267
}
270268
}

0 commit comments

Comments
 (0)