# Code Structure

A few things will not be clear upfront when you see the code. This is mainly the container/controller logic and the provider/writer logic.

The first two, container/controller are the entry points to the api. Since the API is using GraphQL for public interface, We need a way to communicate from GraphQL to the code.

This is where Containers come into play. A Container is simply a class that handles a specific feature's calls. For Example, all customer related queries and mutations are in the customers.container.ts file. This file is a thin layer between GraphQL and the Controllers, it instantiates the controller and for each endpoint call the equivalent method on the controller.

Last Updated: 7/15/2022, 3:12:37 PM