A tool for running and testing AWS AppSync JavaScript resolvers locally without the need for a data source. This project allows developers to simulate AppSync functionality in a local environment, making it easier to develop and test GraphQL APIs.
- Support for JavaScript resolvers that do not use a data source.
- Customizable schema and resolver configuration.
- JWT verification for secure access to the API.
appsync-local-server
├── src
│ ├── index.js # Entry point of the application
│ ├── server.js # Local AppSync server setup
│ ├── schema # GraphQL schema definitions
│ │ └── schema.graphql # Main GraphQL schema file
│ ├── resolvers # Resolver functions
│ │ └── exampleResolver.js # Example resolver implementation
│ ├── config # Configuration files
│ │ └── appsync-config.json # AppSync configuration settings
│ └── utils # Utility functions
│ └── jwtVerifier.js # JWT verification logic
├── package.json # NPM package configuration
└── README.md # Project documentation
- Clone the repo
cd example && npm installnpm link ../# to link your CLI globallynpm run start:local
To start the local AppSync server, run the following command:
node src/index.js
This will initialize the server, load the schema, and set up the resolvers.
The configuration for the AppSync server can be found in src/config/appsync-config.json. This file allows you to specify resolver locations and JWT verification settings.
Contributions are welcome! Please open an issue or submit a pull request for any enhancements or bug fixes.
This project is licensed under the ISC License.