Skip to content

Commit 0b6671e

Browse files
authored
Add link to full API for loadDocuments (#1801)
Spent a few hours debugging why `loadDocuments` wasn't working as expected - there's a default of filtering NON_OPERATION_KINDS in the options that I missed :( I had only read this page - telling the user "hey watch out, there's some defaults to be aware of!" and linking to them would be great. Thanks! :) Thanks!
1 parent ad34939 commit 0b6671e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

website/docs/documents-loading.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const document4 = loadDocuments('./src/my-component.ts', { // load from code fi
4040

4141
```
4242

43-
`loadDocuments` return an array of document sources and these source objects have the following structure;
43+
`loadDocuments` returns an array of document sources. Each source object has the following structure:
4444
```ts
4545
interface DocumentSource {
4646
document: DocumentNode; // Object representation of GraphQL Content
@@ -49,4 +49,6 @@ interface DocumentSource {
4949
}
5050
```
5151

52+
`loadDocuments` takes in additional configuration via the `options` object (the second argument). There are some defaults to be aware of - to learn more, see [the full API documentation](/docs/api/modules/load/#loaddocuments).
53+
5254
> You can learn more about [loaders](/docs/loaders) to load documents from different sources.

0 commit comments

Comments
 (0)