@@ -140,8 +140,10 @@ fun String.toGQLSelections(options: ParserOptions = ParserOptions.Default): List
140
140
* You can then use [validateAsSchema] to validate the contents and get a [Schema].
141
141
* Or use [validateAsExecutable] to validate the contents get a list of operations/fragments.
142
142
*
143
- * Closes [BufferedSource]
143
+ * Closes [BufferedSource].
144
144
*
145
+ * @param filePath the path of a file on the host filesystem where the source is coming from. If provided, [filePath]
146
+ * is used to display context for parsing errors. If the source doesn't come from a file, pass `null`.
145
147
* @return a [GQLResult] with either a non-null [GQLDocument] or a list of issues.
146
148
*/
147
149
@ApolloExperimental
@@ -152,7 +154,10 @@ fun BufferedSource.parseAsGQLDocument(filePath: String? = null, options: ParserO
152
154
/* *
153
155
* Parses the source to a [GQLValue], validating the syntax but not the contents of the value.
154
156
*
155
- * Closes [BufferedSource]
157
+ * Closes [BufferedSource].
158
+ *
159
+ * @param filePath the path of a file on the host filesystem where the source is coming from. If provided, [filePath]
160
+ * is used to display context for parsing errors. If the source doesn't come from a file, pass `null`.
156
161
*/
157
162
@ApolloExperimental
158
163
fun BufferedSource.parseAsGQLValue (filePath : String? = null, options : ParserOptions = ParserOptions .Default ): GQLResult <GQLValue > {
@@ -162,7 +167,10 @@ fun BufferedSource.parseAsGQLValue(filePath: String? = null, options: ParserOpti
162
167
/* *
163
168
* Parses the source to a [GQLType], validating the syntax but not the contents of the value.
164
169
*
165
- * Closes [BufferedSource]
170
+ * Closes [BufferedSource].
171
+ *
172
+ * @param filePath the path of a file on the host filesystem where the source is coming from. If provided, [filePath]
173
+ * is used to display context for parsing errors. If the source doesn't come from a file, pass `null`.
166
174
*/
167
175
@ApolloExperimental
168
176
fun BufferedSource.parseAsGQLType (filePath : String? = null, options : ParserOptions = ParserOptions .Default ): GQLResult <GQLType > {
@@ -173,6 +181,9 @@ fun BufferedSource.parseAsGQLType(filePath: String? = null, options: ParserOptio
173
181
* Parses the source to a [List]<[GQLSelection]>, validating the syntax but not the contents of the selections.
174
182
*
175
183
* Closes [BufferedSource]
184
+ *
185
+ * @param filePath the path of a file on the host filesystem where the source is coming from. If provided, [filePath]
186
+ * is used to display context for parsing errors. If the source doesn't come from a file, pass `null`.
176
187
*/
177
188
@ApolloExperimental
178
189
fun BufferedSource.parseAsGQLSelections (
0 commit comments