Fix graphql endpoint setup order.

This commit is contained in:
2021-05-12 10:34:32 +01:00
parent 3e2dd803f1
commit abff330394
2 changed files with 38 additions and 14 deletions
+7 -3
View File
@@ -27,9 +27,13 @@ type requestBase struct {
func prepare() {
value, present := os.LookupEnv("GRAPHQL_ENDPOINT")
if present {
GraphQLUrl = value
} else {
if GraphQLUrl == "" && present {
if present {
GraphQLUrl = value
} else {
GraphQLUrl = "http://127.0.0.1:8080/v1/graphql"
}
} else if GraphQLUrl == "" && !present {
GraphQLUrl = "http://127.0.0.1:9090/v1/graphql"
}
}