API in Webiny is powered by Apollo Server and is constructed using plugins (just as any other part of Webiny).
API consists of multiple GraphQL schemas that are merged into one main schema. The entire merging process is taken care of for you by Webiny, so all you need to do is write your plugins.
The following code demonstrates the
handler.js file (Lambda handler):
createHandler is a function provided by Webiny to setup the API
server ready for deployment to Lambda or local development using
config is the only parameter you need to setup a server (config structure will be covered in the next article).
Everything else is done using plugins. In the upcoming articles we will take a look at the variety of plugins you can register to build your API.