graphql-engine/server/src-lib/Hasura/RQL/IR/RemoteSchema.hs
Vamshi Surabhi 23e1cb218a simplification of generalized joins execution
This PR simplifies the types that represent a remote relationship in IR so that they can be reused in other parts (in remote schema types) which could have remote relationships.

The comments on the PR explain the main changes.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2979
GitOrigin-RevId: 559c51d9d6ae79e2183ce4347018741b9096ac74
2021-12-07 13:12:57 +00:00

27 lines
813 B
Haskell

module Hasura.RQL.IR.RemoteSchema
( RemoteFieldArgument (..),
RemoteSchemaSelect (..),
)
where
import Hasura.GraphQL.Parser.Schema (InputValue)
import Hasura.Prelude
import Hasura.RQL.Types.Relationships.ToSchema
import Hasura.RQL.Types.RemoteSchema
import Hasura.RQL.Types.ResultCustomization
import Language.GraphQL.Draft.Syntax qualified as G
data RemoteFieldArgument = RemoteFieldArgument
{ _rfaArgument :: !G.Name,
_rfaValue :: !(InputValue RemoteSchemaVariable)
}
deriving (Eq, Show)
data RemoteSchemaSelect = RemoteSchemaSelect
{ _rselArgs :: ![RemoteFieldArgument],
_rselResultCustomizer :: !ResultCustomizer,
_rselSelection :: !(G.SelectionSet G.NoFragments RemoteSchemaVariable),
_rselFieldCall :: !(NonEmpty FieldCall),
_rselRemoteSchema :: !RemoteSchemaInfo
}