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

Componentise into types (ConnectionType, EdgeType, PageInfoType, etc) #27

Open
torreytsui opened this issue Jan 12, 2024 · 0 comments
Open

Comments

@torreytsui
Copy link

torreytsui commented Jan 12, 2024

Motivation

I have use cases to implement using a stricter typed system.

That is, in my domain, I implement custom types to extends ObjectType.

Before

However, that is impossible if we use this library, because it configs the object type using the helper functions:

  • Relay::connectionType(...): ObjectType
  • Relay::edgeType(...): ObjectType
  • etc

After

We can make it more flexible by introducing more granular Relay compliant types

  • Relay::connectionType(...): ConnectionType
  • Relay::edgeType(...): EdgeType

This also make the components more flexible (open-closed principle?!)

class MyCustomType extends ConnectionType
{
}

What do you think?

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

No branches or pull requests

1 participant