forked from OSS/graphql
Parse interface type definition
This commit is contained in:
@ -38,6 +38,7 @@ typeSystemDefinition = schemaDefinition
|
||||
typeDefinition :: Parser TypeDefinition
|
||||
typeDefinition = scalarTypeDefinition
|
||||
<|> objectTypeDefinition
|
||||
<|> interfaceTypeDefinition
|
||||
<|> unionTypeDefinition
|
||||
<?> "TypeDefinition"
|
||||
|
||||
@ -83,6 +84,15 @@ unionMemberTypes sepBy' = UnionMemberTypes
|
||||
<*> name `sepBy'` pipe
|
||||
<?> "UnionMemberTypes"
|
||||
|
||||
interfaceTypeDefinition :: Parser TypeDefinition
|
||||
interfaceTypeDefinition = InterfaceTypeDefinition
|
||||
<$> description
|
||||
<* symbol "interface"
|
||||
<*> name
|
||||
<*> opt directives
|
||||
<*> braces (many fieldDefinition)
|
||||
<?> "InterfaceTypeDefinition"
|
||||
|
||||
implementsInterfaces ::
|
||||
Foldable t =>
|
||||
(Parser Text -> Parser Text -> Parser (t NamedType)) ->
|
||||
|
Reference in New Issue
Block a user