From 0b6671ec3c9c60dd96fa7a893ef837dabfacba4e Mon Sep 17 00:00:00 2001 From: Mark Larah Date: Tue, 21 Jul 2020 07:15:42 -0700 Subject: [PATCH] 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! --- website/docs/documents-loading.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/website/docs/documents-loading.md b/website/docs/documents-loading.md index 76a53ed4d24..7eb893d473e 100644 --- a/website/docs/documents-loading.md +++ b/website/docs/documents-loading.md @@ -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 @@ -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.