Open charlypoly opened 4 years ago
Hey @wittydeveloper,
I totally agree on adding the ability to configure resolved data according to a provided type, this is totally going to be a feature, I'm still trying to come out with a clear API for this though, any suggestion greatly appreciated.
Regarding you question:
How should be handle nullable field by default?
I was thinking maybe using resolvers for each field would help with this?
Thanks
@dfernandeza
any suggestion greatly appreciated.
I think that design-wise, Apollo 3 new TypePolicy
is a good inspiration: https://www.apollographql.com/docs/react/v3.0-beta/caching/cache-configuration/#the-typepolicy-type
I was thinking maybe using resolvers for each field would help with this?
I was more thinking for the use-case when no resolvers exist (lorem ipsum, etc)
I like your idea to fallback to default data given the type. I would also propose:
GraphQL scalar Type
:Int
,String
, etcGraphQL object type and fields
:User.name
, etcOpen questions: