Skip to content

Commit 432f6d7

Browse files
Leonardo Nobregakvklink
authored andcommitted
fix graphql federation
1 parent 2903a26 commit 432f6d7

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docker/netbox/patch_federation.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,23 @@ def patch_types():
4141
f.write(text)
4242

4343

44+
def patch_subscription_query():
45+
file = NETBOX_ROOT / 'extras/graphql/schema.py'
46+
text = file.open().read()
47+
48+
text = re.sub("subscription:", "nb_subscription:", text, count=1)
49+
text = re.sub("subscription_list:", "nb_subscription_list:", text, count=1)
50+
51+
with file.open(mode='w') as f:
52+
f.write(text)
53+
54+
4455
def main():
4556
if not NETBOX_ROOT.is_dir():
4657
raise Exception(f"Netbox root {NETBOX_ROOT} not found")
4758

4859
patch_types()
60+
patch_subscription_query()
4961

5062

5163
if __name__ == '__main__':

0 commit comments

Comments
 (0)