Skip to content

Commit f508c35

Browse files
Nols1000JoviDeCroock
authored andcommitted
Apply suggestions from code review
Co-authored-by: Jovi De Croock <decroockjovi@gmail.com>
1 parent 1e411a3 commit f508c35

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

src/utilities/getIntrospectionQuery.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,10 @@ export interface IntrospectionOptions {
4646
oneOf?: boolean;
4747

4848
/**
49-
* How deep to recurse into nested types. Larger values will result in more
50-
* accurate results, but have a higher load. Some servers might restrict the
51-
* maximum query depth. If thats the case, try decreasing this value.
49+
* How deep to recurse into nested types, larger values will result in more
50+
* accurate results, but have a higher load on the server.
51+
* Some servers might restrict the maximum query depth or complexity.
52+
* If that's the case, try decreasing this value.
5253
*
5354
* Default: 9
5455
*/
@@ -95,12 +96,12 @@ export function getIntrospectionQuery(options?: IntrospectionOptions): string {
9596
return '';
9697
}
9798
if (level > 100) {
98-
throw new Error("Please set typeDepth to a reasonable value; the default is 9.");
99+
throw new Error('Please set typeDepth to a reasonable value; the default is 9.');
99100
}
100101
return `
101102
${indent}ofType {
102103
${indent} name
103-
${indent} kind${ofType(level - 1, indent + " ")}
104+
${indent} kind${ofType(level - 1, indent + ' ')}
104105
${indent}}`;
105106
}
106107

@@ -176,7 +177,7 @@ ${indent}}`;
176177
177178
fragment TypeRef on __Type {
178179
kind
179-
name${ofType(optionsWithDefault.typeDepth ?? 9, " ")}
180+
name${ofType(optionsWithDefault.typeDepth ?? 9, ' ')}
180181
}
181182
`;
182183
}

0 commit comments

Comments
 (0)