mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 17:31:56 +03:00
26 lines
790 B
Haskell
26 lines
790 B
Haskell
{-# LANGUAGE FlexibleContexts #-}
|
|
{-# LANGUAGE OverloadedStrings #-}
|
|
{-# LANGUAGE QuasiQuotes #-}
|
|
{-# LANGUAGE TemplateHaskell #-}
|
|
|
|
module TH
|
|
( metadataQuery
|
|
, migrateMetadataFrom1
|
|
, migrateMetadataFrom4
|
|
) 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)))
|
|
|
|
migrateMetadataFrom1 :: RQLQuery
|
|
migrateMetadataFrom1 = $(unTypeQ (Y.decodeFile "src-rsr/migrate_metadata_from_1.yaml" :: Q (TExp RQLQuery)))
|
|
|
|
migrateMetadataFrom4 :: RQLQuery
|
|
migrateMetadataFrom4 = $(unTypeQ (Y.decodeFile "src-rsr/migrate_metadata_from_4_to_5.yaml" :: Q (TExp RQLQuery)))
|