graphql-engine-1.0.0: GraphQL API over Postgres
Safe HaskellNone
LanguageHaskell2010

Hasura.GraphQL.ApolloFederation

Description

Tools for generating fields for Apollo federation

Synopsis

Documentation

data ApolloFederationAnyType Source #

Haskell representation of _Any scalar

Constructors

ApolloFederationAnyType 

Fields

anyParser :: Parser origin 'Both Parse ApolloFederationAnyType Source #

Parser for _Any scalar

mkServiceField :: FieldParser Parse (SchemaIntrospection -> QueryRootField UnpreparedValue) Source #

Creates _service FieldParser using the schema introspection. This will allow us to process the following query:

query {
  _service {
    sdl
  }
}

generateSDL :: SchemaIntrospection -> Text Source #

Generate sdl from the schema introspection

filterAndWrapTypeSystemDefinition :: TypeDefinition [Name] InputValueDefinition -> Maybe TypeSystemDefinition Source #

Filter out schema components from sdl which are not required by apollo federation and wraps it in TypeSystemDefinition

mkEntityUnionFieldParser :: [(Name, Parser 'Output Parse (ApolloFederationParserFunction Parse))] -> FieldParser Parse (QueryRootField UnpreparedValue) Source #

Creates _entities FieldParser using Parsers for Entity union, schema introspection and a list of all query FieldParser. This will allow us to process the following query:

query ($representations: [_Any!]!) {
  _entities(representations: $representations) {
    ... on SomeType {
      foo
      bar
    }
  }
}