- Working my through Apollos fullstack tutorial to go over apollo/GQL fundamentals.
If a declared field’s type is in [Square Brackets], it’s an array of the specified type. If an array has an exclamation point after it, the array cannot be null, but it can be empty.
the resolver for a parent field always executes before the resolvers for that field’s children.
-
it’s best to keep resolvers very small. offload complex logic to seperate
xAPI.ts/js
orxManagers.ts/js
file . This way if there are any changes to your backend, resolver logic does not need to be touched. -
Top level resolvers will still execute even if there are some custom resolvers which we have not written for yet. This is becasue Apollo defines a default resolver for any field you don’t define a custom resolver for.