Skip to content

Commit 88cf354

Browse files
committed
documentation of schema constructor
1 parent 2ac41f6 commit 88cf354

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/type/schema.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,18 @@ import { isEqualType, isTypeSubTypeOf } from '../utilities/typeComparators';
4242
* mutation: MyAppMutationRootType
4343
* });
4444
*
45+
* Note: If an array of `directives` are provided to GraphQLSchema, that will be
46+
* the exact list of directives represented and allowed. If `directives` is not
47+
* provided then a default set of the built-in `[ @include, @skip ]` directives
48+
* will be used. If you wish to provide *additional* directives to these
49+
* built-ins, you must explicitly declare them. Example:
50+
*
51+
* directives: [
52+
* myCustomDirective,
53+
* GraphQLIncludeDirective,
54+
* GraphQLSkipDirective
55+
* ]
56+
*
4557
*/
4658
export class GraphQLSchema {
4759
_queryType: GraphQLObjectType;

0 commit comments

Comments
 (0)