graphql-engine/server/src-lib/Hasura/GraphQL/Parser/DirectiveName.hs
Samir Talwar 8db9b77c77 server: Reorganize quasi-quoted names.
Pretty much all quasi-quoted names in the server code base have ended up in `Hasura.GraphQL.Parser.Constants`. I'm now finding this unpleasant for two reasons:

1. I would like to factor out the parser code into its own Cabal package, and I don't want to have to expose all these names.
2. Most of them really have nothing to do with the parsers.

In order to remedy this, I have:

1. moved the names used by parser code to `Hasura.GraphQL.Parser.DirectiveName`, as they're all related to directives;
2. moved `Hasura.GraphQL.Parser.Constants` to `Hasura.Name`, changing the qualified import name from `G` to `Name`;
3. moved names only used in tests to the appropriate test case;
4. removed unused items from `Hasura.Name`; and
5. grouped related names.

Most of the changes are simply changing `G` to `Name`, which I find much more meaningful.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4777
GitOrigin-RevId: a77aa0aee137b2b5e6faec94495d3a9fbfa1348b
2022-06-23 09:15:31 +00:00

37 lines
636 B
Haskell

{-# LANGUAGE QuasiQuotes #-}
module Hasura.GraphQL.Parser.DirectiveName
( _cached,
_if,
_include,
_refresh,
_skip,
_ttl,
__multiple_top_level_fields,
)
where
import Language.GraphQL.Draft.Syntax as G
import Language.GraphQL.Draft.Syntax.QQ as G
_cached :: G.Name
_cached = [G.name|cached|]
_if :: G.Name
_if = [G.name|if|]
_include :: G.Name
_include = [G.name|include|]
_refresh :: G.Name
_refresh = [G.name|refresh|]
_skip :: G.Name
_skip = [G.name|skip|]
_ttl :: G.Name
_ttl = [G.name|ttl|]
__multiple_top_level_fields :: G.Name
__multiple_top_level_fields = [G.name|_multiple_top_level_fields|]