Should GraphQL resources support hierarchical path names for resources? #764
ThisaruGuruge
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In GraphQL context, what is the meaning of a hierarchical path name for a resource?
GraphQL has resolvers that return either
Scalar
,Object
orEnum
.Each resource function in a GraphQL service becomes a resolver itself. These resolvers have return types.
For example:
The resource function
profile
is now become a field (selection) of the typequeryType
of the corresponding graphql schema. It has a return type ofPerson
.If we have a resource like this:
What should be the type of the
profile
field? How can we infer this type?Therefore, IMHO, we should not support hierarchical path names in GraphQL resources.
WDYT?
@shafreenAnfar
Beta Was this translation helpful? Give feedback.
All reactions