Skip to content

Commit b3cd982

Browse files
committed
Marked some todos for when the Data scalar is supposed to be removed
1 parent cd2afe3 commit b3cd982

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

graphql-api-generator/generator.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ def run(schema: GraphQLSchema, config: dict):
5252
#Avoid some weird config combinations
5353
config.get('generation')['generate_datetime'] = config.get('generation').get('generate_datetime') or config.get('generation').get('field_for_creation_date') or config.get('generation').get('field_for_last_update_date')
5454

55+
# TODO: Remove this when we scrap the Date scalar
5556
# check if Date exists, or should be added
5657
# If it already exists (in the expected way, we handle it as if we added it
5758
config.get('generation')['generate_date'] = date_control(schema, config.get('generation').get('generate_date'))
@@ -280,6 +281,7 @@ def datetime_control(schema):
280281
raise Exception('DateTime could not be added as scalar!')
281282

282283

284+
# TODO: Remove this when we scrap the Date scalar
283285
def date_control(schema, config: dict):
284286
type_names = set(schema.type_map.keys())
285287
if 'Date' in type_names:

graphql-api-generator/utils/utils.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -473,18 +473,15 @@ def add_scalar_filters(schema: GraphQLSchema, config: dict):
473473
' _neq: Boolean ' \
474474
'} '
475475

476-
# Date (behaves like a string?)
476+
# TODO: Scrap this when we remove the Date scalar
477+
# Date (behaves like a string)
477478
if config.get('generation').get('generate_date'):
478479
manually_handled_scalars.append('Date')
479480
make += 'input _DateFilter {' \
480481
' _eq: Date ' \
481482
' _neq: Date ' \
482483
' _in: [Date] ' \
483484
' _nin: [Date] ' \
484-
' _gt: Date ' \
485-
' _egt: Date ' \
486-
' _lt: Date ' \
487-
' _elt: Date ' \
488485
'} '
489486

490487
# DateTime (behaves like a integer)

0 commit comments

Comments
 (0)