Skip to content

Commit

Permalink
Add link to full API for loadDocuments (#1801)
Browse files Browse the repository at this point in the history
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!
  • Loading branch information
magicmark authored Jul 21, 2020
1 parent ad34939 commit 0b6671e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion website/docs/documents-loading.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const document4 = loadDocuments('./src/my-component.ts', { // load from code fi

```

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

`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).

> You can learn more about [loaders](/docs/loaders) to load documents from different sources.

0 comments on commit 0b6671e

Please sign in to comment.