Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

fix(service): fix to regex so it wont affect autogenerated types #8

Merged
merged 1 commit into from
Oct 3, 2019
Merged
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
2 changes: 1 addition & 1 deletion graphene_federation/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def get_sdl(schema, custom_entities):
string_schema = pattern.sub(" ", string_schema)

for entity_name, entity in custom_entities.items():
type_def_re = r"(type %s[^\{]*)" % entity_name
type_def_re = r"(type %s [^\{]*)" % entity_name
repl_str = r"\1 %s " % entity._sdl
pattern = re.compile(type_def_re)
string_schema = pattern.sub(repl_str, string_schema)
Expand Down