mirror of
https://github.com/Airsequel/AirGQL.git
synced 2025-08-14 02:36:57 +03:00
Move mutation tests into their own file & fix breaking tests
This commit is contained in:
parent
7a9914325d
commit
d490179428
7 changed files with 1516 additions and 1227 deletions
source/AirGQL
|
@ -902,7 +902,7 @@ mutationType connection maxRowsPerTable accessMode dbId tables = do
|
|||
"Column "
|
||||
<> T.unpack column
|
||||
<> " cannot be set on conflicts without \
|
||||
\ being explicitly provided"
|
||||
\being explicitly provided"
|
||||
|
||||
pure $
|
||||
quoteKeyword column
|
||||
|
|
|
@ -231,7 +231,11 @@ mutationResponseType accessMode table = do
|
|||
]
|
||||
<> readonlyFields
|
||||
)
|
||||
& Type.withDescription ("Mutation response for " <> table.name)
|
||||
& Type.withDescription
|
||||
( "Mutation response for table \""
|
||||
<> table.name
|
||||
<> "\""
|
||||
)
|
||||
|
||||
|
||||
mutationByPkResponseType :: AccessMode -> TableEntry -> Type.IntrospectionType
|
||||
|
@ -250,7 +254,11 @@ mutationByPkResponseType accessMode table = do
|
|||
]
|
||||
<> readonlyFields
|
||||
)
|
||||
& Type.withDescription ("Mutation response for " <> table.name)
|
||||
& Type.withDescription
|
||||
( "Response for a PK-based mutation on table \""
|
||||
<> table.name
|
||||
<> "\""
|
||||
)
|
||||
|
||||
|
||||
tableInsertField :: AccessMode -> TableEntry -> Type.Field
|
||||
|
@ -388,7 +396,7 @@ tableUpdateFieldByPk accessMode tables table = do
|
|||
)
|
||||
(Type.nonNull $ mutationByPkResponseType accessMode table)
|
||||
& Type.fieldWithDescription
|
||||
("Update row in table \"" <> table.name <> "\"")
|
||||
("Update row in table \"" <> table.name <> "\" by PK")
|
||||
& Type.withArguments arguments
|
||||
|
||||
|
||||
|
@ -423,7 +431,7 @@ tableDeleteFieldByPK accessMode tables table = do
|
|||
)
|
||||
(Type.nonNull $ mutationByPkResponseType accessMode table)
|
||||
& Type.fieldWithDescription
|
||||
("Delete row in table \"" <> table.name <> "\"")
|
||||
("Delete row in table \"" <> table.name <> "\" by PK")
|
||||
& Type.withArguments args
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue