Skip to content

Commit a6cb5cd

Browse files
Apply suggestions from code review
Co-authored-by: Jovi De Croock <[email protected]>
1 parent 366de1f commit a6cb5cd

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/utilities/getIntrospectionQuery.ts

+7-6
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,10 @@ export interface IntrospectionOptions {
4040
oneOf?: boolean;
4141

4242
/**
43-
* How deep to recurse into nested types. Larger values will result in more
44-
* accurate results, but have a higher load. Some servers might restrict the
45-
* maximum query depth. If thats the case, try decreasing this value.
43+
* How deep to recurse into nested types, larger values will result in more
44+
* accurate results, but have a higher load on the server.
45+
* Some servers might restrict the maximum query depth or complexity.
46+
* If that's the case, try decreasing this value.
4647
*
4748
* Default: 9
4849
*/
@@ -85,12 +86,12 @@ export function getIntrospectionQuery(options?: IntrospectionOptions): string {
8586
return '';
8687
}
8788
if (level > 100) {
88-
throw new Error("Please set typeDepth to a reasonable value; the default is 9.");
89+
throw new Error('Please set typeDepth to a reasonable value; the default is 9.');
8990
}
9091
return `
9192
${indent}ofType {
9293
${indent} name
93-
${indent} kind${ofType(level - 1, indent + " ")}
94+
${indent} kind${ofType(level - 1, indent + ' ')}
9495
${indent}}`;
9596
}
9697

@@ -162,7 +163,7 @@ ${indent}}`;
162163
163164
fragment TypeRef on __Type {
164165
kind
165-
name${ofType(optionsWithDefault.typeDepth ?? 9, " ")}
166+
name${ofType(optionsWithDefault.typeDepth ?? 9, ' ')}
166167
}
167168
`;
168169
}

0 commit comments

Comments
 (0)