Skip to content

Commit

Permalink
Merge pull request #15 from strollby/feat/schema
Browse files Browse the repository at this point in the history
Feat/schema
  • Loading branch information
arun-sureshkumar authored Dec 10, 2023
2 parents 13faef1 + ccd7d89 commit 3a8871b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion graphene_federation/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ def build_schema(
query: Optional[ObjectType] = None,
mutation: Optional[ObjectType] = None,
enable_federation_2=False,
schema: Optional[Schema] = None,
**kwargs
) -> Schema:
schema = Schema(query=query, mutation=mutation, **kwargs)
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)
Expand Down

0 comments on commit 3a8871b

Please sign in to comment.