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

Should entity resolvers be limited to the root level. #8

Open
michaelstaib opened this issue Jan 23, 2024 · 1 comment
Open

Should entity resolvers be limited to the root level. #8

michaelstaib opened this issue Jan 23, 2024 · 1 comment

Comments

@michaelstaib
Copy link
Member

michaelstaib commented Jan 23, 2024

Do we want to allow entity resolvers that can be nested?

type Query {
  persons: PersonResolvers! @internal
}

type PersonResolvers @entityResolver {
  byId(id: ID!): Person
  byName(name: String!): Person
}
@martijnwalraven
Copy link

Yes, I think entity resolvers should be allowed on nested objects as long as these are singletons (so as long as the fields that lead to it don't take arguments). Not sure if we should allow @entityResolver (or whatever directive we land on) on types however, because the marker applies to individual fields. (Also, I'm assuming @internal on Query.persons is used here to hide the entity resolvers from the API schema, but you wouldn't generally want that because these fields are useful for clients as well.)

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

2 participants