A declarative approach is the better strategy and should be used for both the functional APIs and the GraphQL layer.