Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Base implementation of interface #37

Merged
merged 6 commits into from
Apr 24, 2024
Merged

Base implementation of interface #37

merged 6 commits into from
Apr 24, 2024

Conversation

DamianCzajkowski
Copy link

@DamianCzajkowski DamianCzajkowski commented Apr 15, 2024

Fixes #28


class GraphQLInterface(GraphQLObject):
__types__: Sequence[Type[GraphQLType]]
__implements__: Optional[Iterable[Union[Type[GraphQLType], Type[Enum]]]]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

__interface__ is mixed with __types__. Types can't implement enums, but can have dependency on them.

@DamianCzajkowski DamianCzajkowski changed the title Base implementation of interface with standarization methods from object type Base implementation of interface Apr 16, 2024
from .description import get_description_node


class GraphQLInterface(GraphQLObject):
__types__: Sequence[Type[GraphQLType]]
__implements__: Optional[Iterable[Union[Type[GraphQLType], Type[Enum]]]]
__valid_type__ = InterfaceTypeDefinitionNode
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets repeat __abstract__: bool = True for posterity sake.

@DamianCzajkowski DamianCzajkowski marked this pull request as ready for review April 18, 2024 09:03
@rafalp rafalp merged commit d4c8f24 into next-api Apr 24, 2024
0 of 4 checks passed
@rafalp rafalp deleted the next-api-interface branch April 24, 2024 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants