mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 01:12:56 +03:00
minor refactor in remoteField' function
This commit is contained in:
parent
d68efa1ba8
commit
1a14acdc0f
@ -83,14 +83,12 @@ remoteField' schemaDoc (G.FieldDefinition description name argsDefinition gType
|
||||
convertType :: G.GType -> m (FieldParser n ())
|
||||
convertType gType' = do
|
||||
case gType' of
|
||||
G.TypeNamed (Nullability True) fieldTypeName -> do
|
||||
remoteFld <- remoteFieldFromName schemaDoc name description fieldTypeName argsDefinition
|
||||
pure . P.nullableField $ remoteFld
|
||||
G.TypeNamed (Nullability True) fieldTypeName ->
|
||||
P.nullableField <$> remoteFieldFromName schemaDoc name description fieldTypeName argsDefinition
|
||||
G.TypeList (Nullability True) gType'' ->
|
||||
addNullableList <$> convertType gType''
|
||||
G.TypeNamed (Nullability False) fieldTypeName -> do
|
||||
remoteFld <- remoteFieldFromName schemaDoc name description fieldTypeName argsDefinition
|
||||
pure . P.nonNullableField $ remoteFld
|
||||
P.nullableField <$> remoteFieldFromName schemaDoc name description fieldTypeName argsDefinition
|
||||
G.TypeList (Nullability False) gType'' ->
|
||||
addNonNullableList <$> convertType gType''
|
||||
in convertType gType
|
||||
|
Loading…
Reference in New Issue
Block a user