From 806a067aaaa2957f79de2bff0720c5f9af473a1a Mon Sep 17 00:00:00 2001 From: Oleg Ilyenko Date: Sun, 24 Jun 2018 00:21:34 +0200 Subject: [PATCH] "Directive order is significant" section --- spec/Section 2 -- Language.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/spec/Section 2 -- Language.md b/spec/Section 2 -- Language.md index 012f19b08..51b26aef3 100644 --- a/spec/Section 2 -- Language.md +++ b/spec/Section 2 -- Language.md @@ -1094,3 +1094,21 @@ and operations. As future versions of GraphQL adopt new configurable execution capabilities, they may be exposed via directives. + +**Directive order is significant** + +Directives may be provided in a specific syntactic order which may have semantic interpretation. + +These two type definitions may have different semantic meaning: + +```graphql example +type Person @addExternalFields(source: "profiles") @excludeField(name: "photo") { + name: String +} +``` + +```graphql example +type Person @excludeField(name: "photo") @addExternalFields(source: "profiles") { + name: String +} +```