Skip to content

Commit

Permalink
Query type name parameterized
Browse files Browse the repository at this point in the history
Query type names not anymore based on conventional "Query" but follows the schema definition

 "queryType": {
      "name": "Whatever"
    },
  • Loading branch information
dapalex committed Jun 29, 2023
1 parent 7620062 commit f5e13b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions codegen/src/extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ def extract_types_from_gqlschema(self):
if currentType[1].kind == TypeKind.SCALAR.name:
self.scalars.update({ currentType[0]: currentType[1] })
continue
if currentType[0] == 'Query':
if hasattr(self.schema.queryType, "name") and currentType[0] == self.schema.queryType.name:
self.queries = currentType[1]
continue
if currentType[0] == 'Mutation':
if hasattr(self.schema.mutationType, "name") and currentType[0] == self.schema.mutationType.name:
self.mutations = currentType[1]
continue
if currentType[1].kind == TypeKind.ENUM.name:
Expand Down
2 changes: 1 addition & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[pytest]
log_cli=true
log_level=ERROR
log_level=DEBUG
markers =
webtest: mark a test as a webtest.

0 comments on commit f5e13b2

Please sign in to comment.