From 7ca239c01eb7cb950d36eebc3f341fa9a9deeb4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=98L=CE=9EG?= Date: Wed, 7 Aug 2019 21:00:50 +0200 Subject: [PATCH] "Directive order is significant" section (#470) --- 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 bd728f6a0..35576356a 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 +} +```