Closed hendrul closed 4 years ago
Came here to create a similar issue. It seems consistently recommended throughout the GQL world to now define types via SDL and Resolvers separately. I think I saw @mickhansen echo something that he doesn't recommend the attributeFields()
helper anymore because of it.
Guess someone just to replace the examples in the README with a PR that shows it like this
The primary reason i don't recommend attributeFields
is that it makes schema generation kind of magic, which i dislike. Using SDL is probably the most anti magic you can get so that's definitely a good idea, although i have personally not yet made the transistion.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
The documentation example could be far more readable if you define the schema in the graphql Schema definition language and create the resolvers object in other step.