Skip to content

Commit

Permalink
use Float as a stopgap for GraphQL’s number type support
Browse files Browse the repository at this point in the history
  • Loading branch information
justincorrigible committed Sep 24, 2024
1 parent 0b57cf1 commit 7f882d1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@ INFO_HEADER := "**************** "

DONE_MESSAGE := $(YELLOW)$(INFO_HEADER) "- done\n" $(END)


# Variables
DOCKER_DIR := $(ROOT_DIR)/docker
ES_DATA_DIR := $(DOCKER_DIR)/elasticsearch
# ES_DOCS_DIR can be given with a custom directory for docs to be seeded
ES_DOCS_DIR := $(ES_DATA_DIR)/documents
ES_HOST := http://localhost:9200
ES_INDEX := file_centric_1.0
ES_LOAD_SCRIPT := $(ES_DATA_DIR)/load-es-data.sh
Expand All @@ -36,10 +35,11 @@ ES_BASIC_AUTH := $(shell printf "$(ES_USER):$(ES_PASS)" | base64)

# Commands
DOCKER_COMPOSE_CMD := \
ES_USER=$(ES_USER) \
ES_USER=$(ES_USER) \
ES_PASS=$(ES_PASS) \
$(DOCKER_COMPOSE_EXE) -f \
$(DOCKER_COMPOSE_EXE) -f \
$(ROOT_DIR)/docker-compose.yml

DC_UP_CMD := COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 $(DOCKER_COMPOSE_CMD) up -d --build


Expand All @@ -49,9 +49,9 @@ DC_UP_CMD := COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 $(DOCKER_COMPOSE_CMD)
_ping_elasticsearch_server:
@echo $(YELLOW)$(INFO_HEADER) "Pinging ElasticSearch on $(ES_HOST)" $(END)
@sh $(RETRY_CMD) "curl --retry 10 \
--retry-delay 0 \
--retry-max-time 40 \
--retry-connrefuse \
--retry-delay 0 \
--retry-max-time 40 \
--retry-connrefused \
-H \"Authorization: Basic $(ES_BASIC_AUTH)\" \
\"$(ES_HOST)/_cluster/health?wait_for_status=yellow&timeout=100s&wait_for_no_initializing_shards=true\""
@echo ""
Expand Down
1 change: 0 additions & 1 deletion docker/Dockerfile.jenkins.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ docks
integration-tests
modules/**/*
!modules/server
scripts
Jenkinsfile
lerna*
prettier*
4 changes: 2 additions & 2 deletions modules/server/src/mapping/mappingToScalarFields.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ export let esToGraphqlTypeMap = {
double: 'Float',
float: 'Float',
half_float: 'Float',
integer: 'Int',
integer: 'Float',
keyword: 'String',
long: 'Int',
long: 'Float', // hack to compensate for graphql not supporting Long. TODO: add a Long custom type https://github.com/overture-stack/arranger/issues/796
object: 'JSON', // https://github.com/overture-stack/arranger/blob/master/modules/schema/src/index.js#L9
scaled_float: 'Float',
string: 'String',
Expand Down

0 comments on commit 7f882d1

Please sign in to comment.