summaryrefslogtreecommitdiff
path: root/src/Language/GraphQL/AST
diff options
context:
space:
mode:
Diffstat (limited to 'src/Language/GraphQL/AST')
-rw-r--r--src/Language/GraphQL/AST/Document.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Language/GraphQL/AST/Document.hs b/src/Language/GraphQL/AST/Document.hs
index a134f35..a65a01d 100644
--- a/src/Language/GraphQL/AST/Document.hs
+++ b/src/Language/GraphQL/AST/Document.hs
@@ -252,6 +252,9 @@ data ObjectField a = ObjectField
, location :: Location
} deriving (Eq, Show)
+instance Functor ObjectField where
+ fmap f ObjectField{..} = ObjectField name (f <$> value) location
+
-- ** Variables
-- | Variable definition.