Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backend/apps/github/api/internal/nodes/issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"url",
],
)
class IssueNode:
class IssueNode(strawberry.relay.Node):
"""GitHub issue node."""

@strawberry.field
Expand Down
2 changes: 1 addition & 1 deletion backend/apps/github/api/internal/nodes/milestone.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"url",
],
)
class MilestoneNode:
class MilestoneNode(strawberry.relay.Node):
"""Github Milestone Node."""

@strawberry.field
Expand Down
2 changes: 1 addition & 1 deletion backend/apps/github/api/internal/nodes/organization.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class OrganizationStatsNode:
"updated_at",
],
)
class OrganizationNode:
class OrganizationNode(strawberry.relay.Node):
"""GitHub organization node."""

@strawberry.field
Expand Down
2 changes: 1 addition & 1 deletion backend/apps/github/api/internal/nodes/pull_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"title",
],
)
class PullRequestNode:
class PullRequestNode(strawberry.relay.Node):
"""GitHub pull request node."""

@strawberry.field
Expand Down
2 changes: 1 addition & 1 deletion backend/apps/github/api/internal/nodes/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"tag_name",
],
)
class ReleaseNode:
class ReleaseNode(strawberry.relay.Node):
"""GitHub release node."""

@strawberry.field
Expand Down
2 changes: 1 addition & 1 deletion backend/apps/github/api/internal/nodes/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"updated_at",
],
)
class RepositoryNode:
class RepositoryNode(strawberry.relay.Node):
"""Repository node."""

@strawberry.field
Expand Down
3 changes: 2 additions & 1 deletion backend/apps/nest/api/internal/nodes/api_key.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""GraphQL node for ApiKey model."""

import strawberry
import strawberry_django

from apps.nest.models.api_key import ApiKey
Expand All @@ -15,5 +16,5 @@
"uuid",
],
)
class ApiKeyNode:
class ApiKeyNode(strawberry.relay.Node):
"""GraphQL node for API keys."""
3 changes: 2 additions & 1 deletion backend/apps/nest/api/internal/nodes/user.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
"""GraphQL node for User model."""

import strawberry
import strawberry_django

from apps.nest.models import User


@strawberry_django.type(User, fields=["username"])
class AuthUserNode:
class AuthUserNode(strawberry.relay.Node):
"""GraphQL node for User model."""

@strawberry_django.field
Expand Down
2 changes: 1 addition & 1 deletion backend/apps/owasp/api/internal/nodes/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


@strawberry.type
class GenericEntityNode:
class GenericEntityNode(strawberry.relay.Node):
"""Base node class for OWASP entities with common fields and resolvers."""

@strawberry.field
Expand Down
3 changes: 2 additions & 1 deletion backend/apps/owasp/api/internal/nodes/event.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""OWASP event GraphQL node."""

import strawberry
import strawberry_django

from apps.owasp.models.event import Event
Expand All @@ -19,5 +20,5 @@
"url",
],
)
class EventNode:
class EventNode(strawberry.relay.Node):
"""Event node."""
3 changes: 2 additions & 1 deletion backend/apps/owasp/api/internal/nodes/post.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""OWASP blog posts GraphQL nodes."""

import strawberry
import strawberry_django

from apps.owasp.models.post import Post
Expand All @@ -15,5 +16,5 @@
"url",
],
)
class PostNode:
class PostNode(strawberry.relay.Node):
"""Post node."""
3 changes: 2 additions & 1 deletion backend/apps/owasp/api/internal/nodes/sponsor.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""OWASP sponsors GraphQL node."""

import strawberry
import strawberry_django

from apps.owasp.models.sponsor import Sponsor
Expand All @@ -14,5 +15,5 @@
"url",
],
)
class SponsorNode:
class SponsorNode(strawberry.relay.Node):
"""Sponsor node."""
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ def test_issue_node_type(self):
def test_issue_node_fields(self):
field_names = {field.name for field in IssueNode.__strawberry_definition__.fields}
expected_field_names = {
"_id",
"created_at",
"state",
"title",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ def test_milestone_node_type(self):
def test_milestone_node_fields(self):
field_names = {field.name for field in MilestoneNode.__strawberry_definition__.fields}
expected_field_names = {
"_id",
"author",
"body",
"closed_issues_count",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ def test_organization_node_inheritance(self):
def test_meta_configuration(self):
field_names = {field.name for field in OrganizationNode.__strawberry_definition__.fields}
expected_field_names = {
"_id",
"avatar_url",
"collaborators_count",
"company",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ def test_release_node_inheritance(self):
def test_meta_configuration(self):
field_names = {field.name for field in ReleaseNode.__strawberry_definition__.fields}
expected_field_names = {
"_id",
"author",
"is_pre_release",
"name",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ def test_project_node_inheritance(self):
def test_meta_configuration(self):
field_names = {field.name for field in ProjectNode.__strawberry_definition__.fields}
expected_field_names = {
"_id",
"contributors_count",
"created_at",
"forks_count",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ def test_api_key_node_configuration(self):
defined_fields = {f.name for f in ApiKeyNode.__strawberry_definition__.fields}

expected_fields = {
"_id",
"created_at",
"expires_at",
"is_revoked",
Expand Down
2 changes: 1 addition & 1 deletion backend/tests/apps/nest/api/internal/nodes/user_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def test_auth_user_node_configuration(self):
assert AuthUserNode.__strawberry_definition__.name == "AuthUserNode"

fields = {f.name: f for f in AuthUserNode.__strawberry_definition__.fields}
assert set(fields.keys()) == {"is_owasp_staff", "username"}
assert set(fields.keys()) == {"_id", "is_owasp_staff", "username"}

username_field = fields["username"]
is_owasp_staff_field = fields["is_owasp_staff"]
Expand Down