graphql-engine/server/src-exec/TH.hs

23 lines
618 B
Haskell
Raw Normal View History

2018-06-27 16:11:32 +03:00
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
module TH
( metadataQuery
2018-09-05 14:42:20 +03:00
, migrateMetadataFrom1
2018-06-27 16:11:32 +03:00
) where
import Language.Haskell.TH.Syntax (Q, TExp, unTypeQ)
import qualified Data.Yaml.TH as Y
import Hasura.Server.Query
metadataQuery :: RQLQuery
metadataQuery = $(unTypeQ (Y.decodeFile "src-rsr/hdb_metadata.yaml" :: Q (TExp RQLQuery)))
2018-09-05 14:42:20 +03:00
migrateMetadataFrom1 :: RQLQuery
migrateMetadataFrom1 = $(unTypeQ (Y.decodeFile "src-rsr/migrate_metadata_from_1.yaml" :: Q (TExp RQLQuery)))