Company
Date Published
Author
Ben Teese
Word count
1972
Language
English
Hacker News points
None

Summary

The text discusses building a portable Apollo Server config, which allows developers to run Apollo Server in different environments (Express and AWS Lambda) without duplicating code. The author introduces the concept of a "config object" that can be shared across integrations, encapsulating schema-related code, resolvers, datasources, and context-related logic. The config object is created using a function called `createConfig`, which takes an environment-specific object as input and returns a new config object with the necessary values. This approach enables developers to use the same codebase for local development and production deployment, making it easier to maintain and update their application. The author also discusses how to handle integration-specific code and context-related logic in a way that makes them portable across environments.