mirror of
https://github.com/zhigang1992/graphql-engine.git
synced 2026-05-25 18:32:23 +08:00
This commit is contained in:
@@ -74,7 +74,7 @@ getAnnVarVals
|
||||
=> [G.VariableDefinition]
|
||||
-> VariableValues
|
||||
-> m AnnVarVals
|
||||
getAnnVarVals varDefsL inpVals = do
|
||||
getAnnVarVals varDefsL inpVals = withPathK "variableValues" $ do
|
||||
|
||||
varDefs <- onLeft (mkMapWith G._vdVariable varDefsL) $ \dups ->
|
||||
throwVE $ "the following variables are defined more than once: " <>
|
||||
@@ -96,7 +96,7 @@ getAnnVarVals varDefsL inpVals = do
|
||||
annDefM <- withPathK "defaultValue" $
|
||||
mapM (validateInputValue constValueParser ty) defM'
|
||||
let inpValM = Map.lookup var inpVals
|
||||
annInpValM <- withPathK "variableValues" $
|
||||
annInpValM <- withPathK (G.unName $ G.unVariable var) $
|
||||
mapM (validateInputValue jsonParser ty) inpValM
|
||||
let varValM = annInpValM <|> annDefM
|
||||
onNothing varValM $ throwVE $
|
||||
|
||||
@@ -5,7 +5,7 @@ response:
|
||||
errors:
|
||||
- extensions:
|
||||
code: parse-failed
|
||||
path: $.variableValues[0].area.coordinates[0]
|
||||
path: $.variableValues.areas[0].area.coordinates[0]
|
||||
message: A LinearRing needs at least 4 Positions
|
||||
query:
|
||||
variables:
|
||||
|
||||
@@ -5,7 +5,7 @@ response:
|
||||
errors:
|
||||
- extensions:
|
||||
code: parse-failed
|
||||
path: $.variableValues[0].location
|
||||
path: $.variableValues.landmarks[0].location
|
||||
message: 'unexpected geometry type: Random'
|
||||
query:
|
||||
variables:
|
||||
|
||||
@@ -4,7 +4,7 @@ status: 400
|
||||
response:
|
||||
errors:
|
||||
- extensions:
|
||||
path: '$.variableValues[0].location.coordinates'
|
||||
path: '$.variableValues.landmarks[0].location.coordinates'
|
||||
code: parse-failed
|
||||
message: A Position needs at least 2 elements
|
||||
query:
|
||||
|
||||
@@ -5,7 +5,7 @@ response:
|
||||
errors:
|
||||
- extensions:
|
||||
code: parse-failed
|
||||
path: $.variableValues[0].area.coordinates[0]
|
||||
path: $.variableValues.areas[0].area.coordinates[0]
|
||||
message: the first and last locations have to be equal for a LinearRing
|
||||
query:
|
||||
variables:
|
||||
|
||||
@@ -4,7 +4,7 @@ status: 400
|
||||
response:
|
||||
errors:
|
||||
- extensions:
|
||||
path: $.variableValues[0].path.coordinates
|
||||
path: $.variableValues.roads[0].path.coordinates
|
||||
code: parse-failed
|
||||
message: A LineString needs at least 2 Positions
|
||||
query:
|
||||
|
||||
Reference in New Issue
Block a user