Skip to content

Commit

Permalink
Bug Fix: build_schema
Browse files Browse the repository at this point in the history
  • Loading branch information
arunsureshkumar committed Dec 10, 2023
1 parent ccd7d89 commit 681455a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions graphene_federation/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,9 @@ def build_schema(
schema = schema or Schema(query=query, mutation=mutation, **kwargs)
schema.auto_camelcase = kwargs.get("auto_camelcase", True)
schema.federation_version = 2 if enable_federation_2 else 1
federation_query = _get_query(schema, query)
return Schema(query=federation_query, mutation=mutation, **kwargs)
federation_query = _get_query(schema, schema.query if schema else query)
return Schema(
query=federation_query,
mutation=schema.mutation if schema else mutation,
**kwargs
)

0 comments on commit 681455a

Please sign in to comment.