Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mak626 committed Jan 13, 2024
1 parent 5f3aa58 commit e322202
Show file tree
Hide file tree
Showing 38 changed files with 781 additions and 969 deletions.
3 changes: 3 additions & 0 deletions graphene_federation/appolo_versions/v1_0.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from graphql import GraphQLArgument, GraphQLDirective, GraphQLNonNull

from ..scalars import _FieldSet
from ..transform import field_set_case_transform
from ..validators import validate_key, validate_requires

key_directive = CustomDirective(
Expand All @@ -15,6 +16,7 @@
is_repeatable=True,
add_definition_to_schema=False,
non_field_validator=validate_key,
input_transform=field_set_case_transform,
)

requires_directive = CustomDirective(
Expand All @@ -27,6 +29,7 @@
is_repeatable=True,
add_definition_to_schema=False,
field_validator=validate_requires,
input_transform=field_set_case_transform,
)


Expand Down
3 changes: 3 additions & 0 deletions graphene_federation/appolo_versions/v2_0.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

from .v1_0 import extends_directive
from ..scalars import FieldSet
from ..transform import field_set_case_transform
from ..validators import validate_key, validate_requires

key_directive = CustomDirective(
Expand All @@ -26,6 +27,7 @@
is_repeatable=True,
add_definition_to_schema=False,
non_field_validator=validate_key,
input_transform=field_set_case_transform,
)

requires_directive = CustomDirective(
Expand All @@ -38,6 +40,7 @@
is_repeatable=True,
add_definition_to_schema=False,
field_validator=validate_requires,
input_transform=field_set_case_transform,
)


Expand Down
3 changes: 1 addition & 2 deletions graphene_federation/directives/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import Any

from graphene import Enum, InputObjectType, Interface, ObjectType, Scalar, Union
from graphene import Enum, InputObjectType, Interface, ObjectType, Union


def is_non_field(field: Any):
Expand All @@ -11,7 +11,6 @@ def is_non_field(field: Any):
or issubclass(field, InputObjectType)
or issubclass(field, Enum)
or issubclass(field, Union)
or issubclass(field, Scalar)
):
return True
else:
Expand Down
Loading

0 comments on commit e322202

Please sign in to comment.