Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the possibility to toggle introspection on and off #154

Merged
merged 2 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion graphql_service/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@

load_dotenv("connections.conf")

DEBUG_MODE = os.getenv("DEBUG_MODE", False) == "True"
DEBUG_MODE = os.getenv("DEBUG_MODE", "false").lower() == "true"
ENABLE_INTROSPECTION = os.getenv("ENABLE_INTROSPECTION", "true").lower() == "true"

EXTENSIONS: Optional[ExtensionList] = (
None # mypy will throw an incompatible type error without this type cast
)
Expand Down Expand Up @@ -172,5 +174,6 @@ def __init__(
extensions=EXTENSIONS,
),
explorer=CustomExplorerGraphiQL(),
introspection=ENABLE_INTROSPECTION,
),
)
1 change: 1 addition & 0 deletions k8s/web-prod/base/configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
apiVersion: v1
data:
DEBUG_MODE: "False"
ENABLE_INTROSPECTION: "True"
HTTP_PROXY: <HTTP_PROXY>
HTTPS_PROXY: <HTTP_PROXY>
http_proxy: <HTTP_PROXY>
Expand Down
2 changes: 1 addition & 1 deletion k8s/web-prod/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- deployment.yaml
- deployment.yaml
3 changes: 2 additions & 1 deletion k8s/web-prod/overlays/internal/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../base

# Uncomment when migrating to new-k8s
# patchesStrategicMerge:
# - patch.yaml
# - patch.yaml
Loading