specify better error msgs for remote schema conflicts (fix #1805) (#1904)

This commit is contained in:
Tirumarai Selvan 2019-04-02 21:18:19 -04:00 committed by Vamshi Surabhi
parent 1c6e962776
commit d53c70cbcd
2 changed files with 5 additions and 5 deletions

View File

@ -1717,10 +1717,10 @@ checkSchemaConflicts gCtx remoteCtx = do
hQRName = G.NamedType "query_root"
hMRName = G.NamedType "mutation_root"
tyMsg ty = "types: [" <> namesToTxt ty <>
"] already exist in current graphql schema"
nodesMsg n = "nodes : [" <> namesToTxt n <>
"] already exist in current graphql schema"
tyMsg ty = "types: [ " <> namesToTxt ty <>
" ] have mismatch with current graphql schema. HINT: Types must be same."
nodesMsg n = "top-level nodes: [ " <> namesToTxt n <>
" ] already exist in current graphql schema. HINT: Top-level nodes can't be same."
namesToTxt = T.intercalate ", " . map G.unName
builtinNodes = ["__type", "__schema", "__typename"]
builtinTy = [ "__Directive"

View File

@ -89,7 +89,7 @@ getUrlFromEnv urlFromEnv = do
where
invalidUri uri = "not a valid URI: " <> T.pack uri
envNotFoundMsg e =
"cannot find environment variable " <> e <> " for custom resolver"
"environment variable '" <> e <> "' not set"
validateRemoteSchemaDef
:: (MonadError QErr m, MonadIO m)