Skip to content

Commit b790002

Browse files
authored
introspectionQuery -> getIntrospectionQuery (#2718)
`introspectionQuery` has been deleted and replaced with `getIntrospectionQuery`
1 parent 171fbc1 commit b790002

File tree

1 file changed

+26
-6
lines changed

1 file changed

+26
-6
lines changed

docs/APIReference-Utilities.md

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ _Introspection_
2121

2222
<ul class="apiIndex">
2323
<li>
24-
<a href="#introspectionquery">
25-
<pre>var introspectionQuery</pre>
26-
A GraphQL introspection query containing enough information to reproduce a type system.
24+
<a href="#getintrospectionquery">
25+
<pre>function getIntrospectionQuery</pre>
26+
Builds a GraphQL introspection query containing enough information to reproduce a type system.
2727
</a>
2828
</li>
2929
<li>
@@ -105,13 +105,33 @@ _Value Validation_
105105

106106
## Introspection
107107

108-
### introspectionQuery
108+
### getIntrospectionQuery
109109

110110
```js
111-
var introspectionQuery: string;
111+
interface IntrospectionOptions {
112+
// Whether to include descriptions in the introspection result.
113+
// Default: true
114+
descriptions?: boolean;
115+
116+
// Whether to include `specifiedByUrl` in the introspection result.
117+
// Default: false
118+
specifiedByUrl?: boolean;
119+
120+
// Whether to include `isRepeatable` flag on directives.
121+
// Default: false
122+
directiveIsRepeatable?: boolean;
123+
124+
// Whether to include `description` field on schema.
125+
// Default: false
126+
schemaDescription?: boolean;
127+
}
128+
129+
function getIntrospectionQuery(
130+
options: IntrospectionOptions
131+
): string;
112132
```
113133

114-
A GraphQL query that queries a server's introspection system for enough
134+
Build a GraphQL query that queries a server's introspection system for enough
115135
information to reproduce that server's type system.
116136

117137
### buildClientSchema

0 commit comments

Comments
 (0)